runs-on: ubuntu-24.04
strategy:
matrix:
- php: ['8.2', '8.3', '8.4']
+ php: ['8.2', '8.3', '8.4', '8.5']
steps:
- uses: actions/checkout@v4
runs-on: ubuntu-24.04
strategy:
matrix:
- php: ['8.2', '8.3', '8.4']
+ php: ['8.2', '8.3', '8.4', '8.5']
steps:
- uses: actions/checkout@v4
"@php artisan view:clear"
],
"refresh-test-database": [
+ "@putenv APP_TIMEZONE=UTC",
"@php artisan migrate:refresh --database=mysql_testing",
"@php artisan db:seed --class=DummyContentSeeder --database=mysql_testing"
]
use BookStack\Users\Models\Role;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Relations\HasMany;
-use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Seeder;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Hash;
{
/**
* Run the database seeds.
- *
- * @return void
*/
- public function run()
+ public function run(): void
{
// Create an editor user
$editorUser = User::factory()->create();
## Building CSS & JavaScript Assets
-This project uses SASS for CSS development and this is built, along with the JavaScript, using a range of npm scripts. The below npm commands can be used to install the dependencies & run the build tasks:
+This project uses SASS for CSS development which is built, along with the JavaScript, using a range of npm scripts. The below npm commands can be used to install the dependencies & run the build tasks:
``` bash
# Install NPM Dependencies
### Debugging
The docker-compose setup ships with Xdebug, which you can listen to on port 9090.
-NB : For some editors like Visual Studio Code, you might need to map your workspace folder to the /app folder within the docker container for this to work.
+NB: For some editors like Visual Studio Code, you might need to map your workspace folder to the /app folder within the docker container for this to work.
## Setup
-The application tests are mostly functional, rather than unit tests, meaning they simulate user actions and system components and therefore these require use of the database. To avoid potential conflicts within your development environment, the tests use a separate database. This is defined via a specific `mysql_testing` database connection in our configuration, and expects to use the following database access details:
+The application tests are mostly functional, rather than unit tests, meaning they simulate user actions and system components, and therefore these require use of the database. To avoid potential conflicts within your development environment, the tests use a separate database. This is defined via a specific `mysql_testing` database connection in our configuration, and expects to use the following database access details:
- Host: `127.0.0.1`
- Username: `bookstack-test`
<?php
-namespace Activity;
+namespace Tests\Activity;
use BookStack\Activity\Models\Comment;
use BookStack\Permissions\Permission;
<?php
-namespace Entity;
+namespace Tests\Entity;
use BookStack\Entities\Models\Book;
use Illuminate\Database\Eloquent\Builder;