Skip to content

Commit ec5642d

Browse files
committed
Update test placement and contents
1 parent c74a5d6 commit ec5642d

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,12 @@ public function testBug13310(): void
15241524
$this->assertNoErrors($errors);
15251525
}
15261526

1527+
public function testBug13392(): void
1528+
{
1529+
$errors = $this->runAnalyse(__DIR__ . '/nsrt/bug-13392.php');
1530+
$this->assertNoErrors($errors);
1531+
}
1532+
15271533
/**
15281534
* @param string[]|null $allAnalysedFiles
15291535
* @return Error[]

tests/PHPStan/Rules/Debug/data/bug-13392.php renamed to tests/PHPStan/Analyser/nsrt/bug-13392.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use RedisCluster;
66

7+
use function PHPStan\Testing\assertType;
8+
79
interface Client
810
{
911
public function get(): RedisCluster;
@@ -12,8 +14,8 @@ public function get(): RedisCluster;
1214
function func(Client $client): void
1315
{
1416
$redisCluster = $client->get();
15-
\PHPStan\dumpType($redisCluster);
17+
assertType('RedisCluster',$redisCluster);
1618

1719
$transaction = $redisCluster->multi();
18-
\PHPStan\dumpType($transaction);
20+
assertType('(bool|RedisCluster)',$transaction);
1921
}

tests/PHPStan/Rules/Debug/DumpTypeRuleTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,4 @@ public function testBug11179NoNamespace(): void
102102
]);
103103
}
104104

105-
public function testBug13392(): void
106-
{
107-
$this->analyse([__DIR__ . '/data/bug-13392.php'], [
108-
[
109-
'Dumped type: RedisCluster',
110-
15,
111-
],
112-
[
113-
'Dumped type: (bool|RedisCluster)',
114-
18,
115-
],
116-
]);
117-
}
118-
119105
}

0 commit comments

Comments
 (0)