From 92e5332525f034d0769c24d9fa996e3ab3cfc7e9 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Thu, 13 Mar 2025 09:20:38 -0400 Subject: [PATCH] silent deprecation test in php 8.4 --- tests/commands/ControllerCommandTest.php | 6 +++--- tests/commands/RouteCommandTest.php | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/commands/ControllerCommandTest.php b/tests/commands/ControllerCommandTest.php index b16f6bc..0c6991e 100644 --- a/tests/commands/ControllerCommandTest.php +++ b/tests/commands/ControllerCommandTest.php @@ -48,16 +48,16 @@ class ControllerCommandTest extends TestCase protected function newApp(string $name, string $version = '') { - $app = new Application($name, $version ?: '0.0.1', fn () => false); + $app = @new Application($name, $version ?: '0.0.1', fn () => false); - return $app->io(new Interactor(static::$in, static::$ou)); + return @$app->io(new Interactor(static::$in, static::$ou)); } public function testConfigAppRootNotSet() { $app = $this->newApp('test', '0.0.1'); $app->add(new ControllerCommand([])); - $app->handle(['runway', 'make:controller', 'Test']); + @$app->handle(['runway', 'make:controller', 'Test']); $this->assertStringContainsString('app_root not set in .runway-config.json', file_get_contents(static::$ou)); } diff --git a/tests/commands/RouteCommandTest.php b/tests/commands/RouteCommandTest.php index 31f7009..d1de48a 100644 --- a/tests/commands/RouteCommandTest.php +++ b/tests/commands/RouteCommandTest.php @@ -54,7 +54,7 @@ class RouteCommandTest extends TestCase protected function newApp(string $name, string $version = '') { - $app = new Application($name, $version ?: '0.0.1', fn() => false); + $app = @new Application($name, $version ?: '0.0.1', fn() => false); return $app->io(new Interactor(static::$in, static::$ou)); } @@ -90,19 +90,19 @@ PHP; public function testConfigIndexRootNotSet() { - $app = $this->newApp('test', '0.0.1'); + $app = @$this->newApp('test', '0.0.1'); $app->add(new RouteCommand([])); - $app->handle(['runway', 'routes']); + @$app->handle(['runway', 'routes']); $this->assertStringContainsString('index_root not set in .runway-config.json', file_get_contents(static::$ou)); } public function testGetRoutes() { - $app = $this->newApp('test', '0.0.1'); + $app = @$this->newApp('test', '0.0.1'); $this->createIndexFile(); $app->add(new RouteCommand(['index_root' => 'tests/commands/index.php'])); - $app->handle(['runway', 'routes']); + @$app->handle(['runway', 'routes']); $this->assertStringContainsString('Routes', file_get_contents(static::$ou)); $expected = <<<'output' @@ -125,10 +125,10 @@ PHP; public function testGetPostRoute() { - $app = $this->newApp('test', '0.0.1'); + $app = @$this->newApp('test', '0.0.1'); $this->createIndexFile(); $app->add(new RouteCommand(['index_root' => 'tests/commands/index.php'])); - $app->handle(['runway', 'routes', '--post']); + @$app->handle(['runway', 'routes', '--post']); $this->assertStringContainsString('Routes', file_get_contents(static::$ou));