Skip to content

Commit 5155bfa

Browse files
committed
[PhpUnit 8] Skip on possible return array on SpecificAssertContainsRector
1 parent cd182d7 commit 5155bfa

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace Rector\PHPUnit\Tests\PHPUnit80\Rector\MethodCall\SpecificAssertContainsRector\Fixture;
4+
5+
class SkipOnPossibleArrayTest extends \PHPUnit\Framework\TestCase
6+
{
7+
public function test(): void
8+
{
9+
$this->assertContains("DummyNumber", $this->getBody());
10+
}
11+
12+
public function getBody(): array|string
13+
{
14+
if (rand(0, 1)) {
15+
return "DummyNumber";
16+
}
17+
18+
return ["DummyNumber"];
19+
}
20+
}

0 commit comments

Comments
 (0)