Skip to content

Commit

Permalink
de-duplicate tests. fix assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jan 10, 2023
1 parent 7d55548 commit 762837f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
9 changes: 7 additions & 2 deletions tests/PHPStan/Analyser/data/bug-3019.php
Expand Up @@ -8,8 +8,13 @@ trait FooTrait
{
public function doFoo(): void
{
assertType('string', __CLASS__);
assertType('string', __NAMESPACE__);
assertType('class-string&literal-string', __CLASS__);
assertType('literal-string', __NAMESPACE__);
}

public function doFooBaz(): void
{
$key = __CLASS__ === 'Bug3019\Foo' ? 'display' : 'layout';
}
}

Expand Down
Expand Up @@ -94,7 +94,7 @@ public function testReportPhpDoc(): void
public function testBug3019(): void
{
$this->treatPhpDocTypesAsCertain = true;
$this->analyse([__DIR__ . '/data/bug-3019.php'], []);
$this->analyse([__DIR__ . '/../../Analyser/data/bug-3019.php'], []);
}

}
21 changes: 0 additions & 21 deletions tests/PHPStan/Rules/Comparison/data/bug-3019.php

This file was deleted.

0 comments on commit 762837f

Please sign in to comment.