Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"phpstan-baseline": "phpstan analyse --memory-limit=512M --generate-baseline",
"lint": "php-cs-fixer fix --diff --dry-run",
"fix-style": "php-cs-fixer fix",
"tests": "phpunit"
"tests": "LOG_DEPRECATIONS_CHANNEL=errorlog phpunit"
},
"extra": {
"branch-alias": {
Expand Down
4 changes: 2 additions & 2 deletions tests/Support/database/factories/CommentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class CommentFactory extends Factory
public function definition(): array
{
return [
'title' => fake()->title,
'body' => fake()->sentence,
'title' => fake()->title(),
'body' => fake()->sentence(),
];
}
}
4 changes: 2 additions & 2 deletions tests/Support/database/factories/PostFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class PostFactory extends Factory
public function definition(): array
{
return [
'title' => fake()->title,
'body' => fake()->sentence,
'title' => fake()->title(),
'body' => fake()->sentence(),
];
}
}
2 changes: 1 addition & 1 deletion tests/Support/database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class UserFactory extends Factory
public function definition(): array
{
return [
'name' => fake()->name,
'name' => fake()->name(),
];
}
}
11 changes: 11 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ protected function getEnvironmentSetUp($app): void
]);

$app['config']->set('app.debug', true);

$deprecationChannel = $app['config']->get('logging.deprecations.channel');

if ($deprecationChannel) {
// By setting `logging.channels.deprecations` here manually we
// override some behaviour in `\Orchestra\Testbench\Bootstrap\HandleExceptions::ensureDeprecationLoggerIsConfigured`
// and avoid enabling the stacktrace
$app['config']->set('logging.channels.deprecations', [
'driver' => $deprecationChannel,
]);
}
}

protected function assertGraphQLSchema($schema): void
Expand Down