Skip to content

Commit 5dd2b57

Browse files
committed
Move more tests
1 parent 6c9f7d3 commit 5dd2b57

File tree

5 files changed

+15
-25
lines changed

5 files changed

+15
-25
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,19 +1027,6 @@ public function testBug5312(): void
10271027
$this->assertSame(13, $errors[4]->getLine());
10281028
}
10291029

1030-
public function testBug5390(): void
1031-
{
1032-
// crash
1033-
$errors = $this->runAnalyse(__DIR__ . '/data/bug-5390.php');
1034-
$this->assertCount(3, $errors);
1035-
$this->assertSame('Property Bug5390\A::$b is never written, only read.', $errors[0]->getMessage());
1036-
$this->assertSame(9, $errors[0]->getLine());
1037-
$this->assertSame('Method Bug5390\A::infiniteRecursion() has no return type specified.', $errors[1]->getMessage());
1038-
$this->assertSame(11, $errors[1]->getLine());
1039-
$this->assertSame('Call to an undefined method Bug5390\B::someMethod().', $errors[2]->getMessage());
1040-
$this->assertSame(12, $errors[2]->getLine());
1041-
}
1042-
10431030
public function testBug7110(): void
10441031
{
10451032
// false positive
@@ -1079,12 +1066,6 @@ public function testBug12934(): void
10791066
$this->assertNoErrors($errors);
10801067
}
10811068

1082-
public function testConditionalExpressionInfiniteLoop(): void
1083-
{
1084-
$errors = $this->runAnalyse(__DIR__ . '/data/conditional-expression-infinite-loop.php');
1085-
$this->assertNoErrors($errors);
1086-
}
1087-
10881069
public function testPr2030(): void
10891070
{
10901071
$errors = $this->runAnalyse(__DIR__ . '/data/pr-2030.php');
@@ -1214,12 +1195,6 @@ public function testBug13492(): void
12141195
$this->assertNoErrors($errors);
12151196
}
12161197

1217-
public function testProcessCalledMethodInfiniteLoop(): void
1218-
{
1219-
$errors = $this->runAnalyse(__DIR__ . '/data/process-called-method-infinite-loop.php');
1220-
$this->assertNoErrors($errors);
1221-
}
1222-
12231198
#[RequiresPhp('>= 8.0')]
12241199
public function testBug9428(): void
12251200
{

tests/bench/RegressionBench.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,19 @@ public function benchBug13218(): void
227227
$this->runAnalyse(__DIR__ . '/data/bug-13218.php');
228228
}
229229

230+
public function benchConditionalExpressionInfiniteLoop(): void
231+
{
232+
$this->runAnalyse(__DIR__ . '/data/conditional-expression-infinite-loop.php');
233+
}
234+
235+
public function benchProcessCalledMethodInfiniteLoop(): void
236+
{
237+
$this->runAnalyse(__DIR__ . '/data/process-called-method-infinite-loop.php');
238+
}
239+
240+
public function benchBug5390(): void
241+
{
242+
$this->runAnalyse(__DIR__ . '/data/bug-5390.php');
243+
}
244+
230245
}

tests/PHPStan/Analyser/data/conditional-expression-infinite-loop.php renamed to tests/bench/data/conditional-expression-infinite-loop.php

File renamed without changes.

tests/PHPStan/Analyser/data/process-called-method-infinite-loop.php renamed to tests/bench/data/process-called-method-infinite-loop.php

File renamed without changes.

0 commit comments

Comments
 (0)