Skip to content

Commit

Permalink
[9.x] Test Improvements (#46658)
Browse files Browse the repository at this point in the history
* Test Improvements

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* Update composer.json

---------

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone authored Apr 2, 2023
1 parent 775eb8a commit d68fefe
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"league/flysystem-read-only": "^3.3",
"league/flysystem-sftp-v3": "^3.0",
"mockery/mockery": "^1.5.1",
"orchestra/testbench-core": "^7.16",
"orchestra/testbench-core": "^7.24",
"pda/pheanstalk": "^4.0",
"phpstan/phpdoc-parser": "^1.15",
"phpstan/phpstan": "^1.4.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
*/
class ImplicitBackedEnumRouteBindingTest extends TestCase
{
protected function defineEnvironment($app): void
{
$app['config']->set(['app.key' => 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF']);
}

public function testWithRouteCachingEnabled()
{
$this->defineCacheRoutes(<<<PHP
Expand Down
5 changes: 5 additions & 0 deletions tests/Integration/Routing/ImplicitModelRouteBindingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ protected function tearDown(): void
parent::tearDown();
}

protected function defineEnvironment($app): void
{
$app['config']->set(['app.key' => 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF']);
}

protected function defineDatabaseMigrations(): void
{
Schema::create('users', function (Blueprint $table) {
Expand Down
5 changes: 5 additions & 0 deletions tests/Integration/Routing/UrlSigningTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ protected function tearDown(): void
Carbon::setTestNow(null);
}

protected function defineEnvironment($app): void
{
$app['config']->set(['app.key' => 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF']);
}

public function testSigningUrl()
{
Route::get('/foo/{id}', function (Request $request, $id) {
Expand Down
5 changes: 5 additions & 0 deletions tests/Testing/AssertRedirectToSignedRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ protected function setUp(): void
$this->urlGenerator = $this->app->make(UrlGenerator::class);
}

protected function defineEnvironment($app): void
{
$app['config']->set(['app.key' => 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF']);
}

public function testAssertRedirectToSignedRouteWithoutRouteName()
{
$this->router->get('test-route', function () {
Expand Down

0 comments on commit d68fefe

Please sign in to comment.