Skip to content

Commit bfe31a0

Browse files
marac19901990sebastianbergmann
authored andcommitted
add test to prove the issue
1 parent 7d817c3 commit bfe31a0

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace unit\Framework\Attributes;
4+
5+
use PHPUnit\Framework\Attributes\DataProvider;
6+
use PHPUnit\Framework\Attributes\Depends;
7+
use PHPUnit\Framework\TestCase;
8+
9+
class DependencyTest extends TestCase
10+
{
11+
public function testOne(): void
12+
{
13+
$this->assertEmpty([]);
14+
}
15+
16+
#[Depends('testOne')]
17+
#[DataProvider('dataProvider')]
18+
public function testTwo(string $example): void
19+
{
20+
$this->assertEmpty($example);
21+
}
22+
23+
public static function dataProvider(): array
24+
{
25+
return [
26+
'case 1' => [
27+
'example' => ''
28+
]
29+
];
30+
}
31+
}

0 commit comments

Comments
 (0)