We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d817c3 commit bfe31a0Copy full SHA for bfe31a0
tests/unit/Framework/Attributes/DependencyTest.php
@@ -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