silent deprecation test in php 8.4

pull/638/head
fadrian06 2 weeks ago
parent 7ff7344815
commit 92e5332525

@ -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));
}

@ -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));

Loading…
Cancel
Save