Skip to content

Commit 92e5332

Browse files
committed
silent deprecation test in php 8.4
1 parent 7ff7344 commit 92e5332

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/commands/ControllerCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ public function tearDown(): void
4848

4949
protected function newApp(string $name, string $version = '')
5050
{
51-
$app = new Application($name, $version ?: '0.0.1', fn () => false);
51+
$app = @new Application($name, $version ?: '0.0.1', fn () => false);
5252

53-
return $app->io(new Interactor(static::$in, static::$ou));
53+
return @$app->io(new Interactor(static::$in, static::$ou));
5454
}
5555

5656
public function testConfigAppRootNotSet()
5757
{
5858
$app = $this->newApp('test', '0.0.1');
5959
$app->add(new ControllerCommand([]));
60-
$app->handle(['runway', 'make:controller', 'Test']);
60+
@$app->handle(['runway', 'make:controller', 'Test']);
6161

6262
$this->assertStringContainsString('app_root not set in .runway-config.json', file_get_contents(static::$ou));
6363
}

tests/commands/RouteCommandTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function tearDown(): void
5454

5555
protected function newApp(string $name, string $version = '')
5656
{
57-
$app = new Application($name, $version ?: '0.0.1', fn() => false);
57+
$app = @new Application($name, $version ?: '0.0.1', fn() => false);
5858

5959
return $app->io(new Interactor(static::$in, static::$ou));
6060
}
@@ -90,19 +90,19 @@ protected function removeColors(string $str): string
9090

9191
public function testConfigIndexRootNotSet()
9292
{
93-
$app = $this->newApp('test', '0.0.1');
93+
$app = @$this->newApp('test', '0.0.1');
9494
$app->add(new RouteCommand([]));
95-
$app->handle(['runway', 'routes']);
95+
@$app->handle(['runway', 'routes']);
9696

9797
$this->assertStringContainsString('index_root not set in .runway-config.json', file_get_contents(static::$ou));
9898
}
9999

100100
public function testGetRoutes()
101101
{
102-
$app = $this->newApp('test', '0.0.1');
102+
$app = @$this->newApp('test', '0.0.1');
103103
$this->createIndexFile();
104104
$app->add(new RouteCommand(['index_root' => 'tests/commands/index.php']));
105-
$app->handle(['runway', 'routes']);
105+
@$app->handle(['runway', 'routes']);
106106

107107
$this->assertStringContainsString('Routes', file_get_contents(static::$ou));
108108
$expected = <<<'output'
@@ -125,10 +125,10 @@ public function testGetRoutes()
125125

126126
public function testGetPostRoute()
127127
{
128-
$app = $this->newApp('test', '0.0.1');
128+
$app = @$this->newApp('test', '0.0.1');
129129
$this->createIndexFile();
130130
$app->add(new RouteCommand(['index_root' => 'tests/commands/index.php']));
131-
$app->handle(['runway', 'routes', '--post']);
131+
@$app->handle(['runway', 'routes', '--post']);
132132

133133
$this->assertStringContainsString('Routes', file_get_contents(static::$ou));
134134

0 commit comments

Comments
 (0)