GeezerVison is showing github.com — Dev: Set timezone for test DB creation, added PHP 8.5 to tests · runphp/BookStack@1be2969
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/test-migrations.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 | runs-on: ubuntu-24.04 | 17 | 17 | strategy: | 18 | 18 | matrix: | 19 | | - php: ['8.2', '8.3', '8.4'] | | 19 | + php: ['8.2', '8.3', '8.4', '8.5'] | 20 | 20 | steps: | 21 | 21 | - uses: actions/checkout@v4 | 22 | 22 |
| |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/test-php.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 | runs-on: ubuntu-24.04 | 17 | 17 | strategy: | 18 | 18 | matrix: | 19 | | - php: ['8.2', '8.3', '8.4'] | | 19 | + php: ['8.2', '8.3', '8.4', '8.5'] | 20 | 20 | steps: | 21 | 21 | - uses: actions/checkout@v4 | 22 | 22 |
| |
Collapse file Copy file name to clipboardExpand all lines: composer.json +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 93 | 93 | "@php artisan view:clear" | 94 | 94 | ], | 95 | 95 | "refresh-test-database": [ | | 96 | + "@putenv APP_TIMEZONE=UTC", | 96 | 97 | "@php artisan migrate:refresh --database=mysql_testing", | 97 | 98 | "@php artisan db:seed --class=DummyContentSeeder --database=mysql_testing" | 98 | 99 | ] | |
Collapse file Copy file name to clipboardExpand all lines: database/seeders/DummyContentSeeder.php +1-4Lines changed: 1 addition & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | use BookStack\Users\Models\Role; | 14 | 14 | use BookStack\Users\Models\User; | 15 | 15 | use Illuminate\Database\Eloquent\Relations\HasMany; | 16 | | -use Illuminate\Database\Eloquent\Relations\Relation; | 17 | 16 | use Illuminate\Database\Seeder; | 18 | 17 | use Illuminate\Support\Collection; | 19 | 18 | use Illuminate\Support\Facades\Hash; | @@ -23,10 +22,8 @@ class DummyContentSeeder extends Seeder | 23 | 22 | { | 24 | 23 | /** | 25 | 24 | * Run the database seeds. | 26 | | - * | 27 | | - * @return void | 28 | 25 | */ | 29 | | - public function run() | | 26 | + public function run(): void | 30 | 27 | { | 31 | 28 | // Create an editor user | 32 | 29 | $editorUser = User::factory()->create(); | |
Collapse file Copy file name to clipboardExpand all lines: dev/docs/development.md +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ When it's time for a release the `development` branch is merged into release wit | 7 | 7 |
| 8 | 8 | ## Building CSS & JavaScript Assets | 9 | 9 |
| 10 | | -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: | | 10 | +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: | 11 | 11 |
| 12 | 12 | ``` bash | 13 | 13 | # Install NPM Dependencies | @@ -113,4 +113,4 @@ docker-compose run app php vendor/bin/phpunit | 113 | 113 | ### Debugging | 114 | 114 |
| 115 | 115 | The docker-compose setup ships with Xdebug, which you can listen to on port 9090. | 116 | | -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. | | 116 | +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. |
Collapse file Copy file name to clipboardExpand all lines: dev/docs/php-testing.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ BookStack has many test cases defined within the `tests/` directory of the app. | 4 | 4 |
| 5 | 5 | ## Setup | 6 | 6 |
| 7 | | -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: | | 7 | +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: | 8 | 8 |
| 9 | 9 | - Host: `127.0.0.1` | 10 | 10 | - Username: `bookstack-test` | |
Collapse file Copy file name to clipboardExpand all lines: tests/Activity/CommentsApiTest.php +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | <?php | 2 | 2 |
| 3 | | -namespace Activity; | | 3 | +namespace Tests\Activity; | 4 | 4 |
| 5 | 5 | use BookStack\Activity\Models\Comment; | 6 | 6 | use BookStack\Permissions\Permission; | |
Collapse file Copy file name to clipboardExpand all lines: tests/Entity/EntityQueryTest.php +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | <?php | 2 | 2 |
| 3 | | -namespace Entity; | | 3 | +namespace Tests\Entity; | 4 | 4 |
| 5 | 5 | use BookStack\Entities\Models\Book; | 6 | 6 | use Illuminate\Database\Eloquent\Builder; | |
|