File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1
- parameters :
2
- ignoreErrors :
3
- - '#Method WyriHaximus\\TestUtilities\\TestCase::setUp\ (\ ) is not final , but since the containing class is abstract , it should be. #'
4
- - '#Method WyriHaximus\\TestUtilities\\TestCase::tearDown\ (\ ) is not final , but since the containing class is abstract , it should be. #'
5
-
6
1
includes :
7
2
- phar://phpstan.phar/conf/bleedingEdge.neon
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ abstract class TestCase extends PHPUnitTestCase
33
33
use MockeryPHPUnitIntegration;
34
34
35
35
public const string WINDOWS_TEMP_DIR_PREFIX = 'C: \\t \\' ;
36
- public const int DEFAULT_AWAIT_TIMEOUT = 60 ;
37
36
public const int WIN_START = 0 ;
38
37
public const int WIN_END = 2 ;
39
38
public const int USLEEP = 50 ;
@@ -68,13 +67,11 @@ protected function tearDown(): void
68
67
$ this ->rmdir ($ this ->baseTmpDir );
69
68
}
70
69
71
- /** @return array<int, array<int, bool>> */
72
- final public static function provideTrueFalse (): array
70
+ /** @return iterable< array<bool>> */
71
+ final public static function provideTrueFalse (): iterable
73
72
{
74
- return [
75
- [true ],
76
- [false ],
77
- ];
73
+ yield 'true ' => [true ];
74
+ yield 'false ' => [false ];
78
75
}
79
76
80
77
final protected function getSysTempDir (): string
@@ -121,7 +118,7 @@ final protected function getRandomNameSpace(): string
121
118
return $ this ->tmpNamespace ;
122
119
}
123
120
124
- /** @return array <string> */
121
+ /** @return list <string> */
125
122
final protected function getFilesInDirectory (string $ path ): array
126
123
{
127
124
$ files = [];
Original file line number Diff line number Diff line change @@ -79,11 +79,19 @@ public function testTemporaryDirectoryAndGetFilesInDirectory(string $int): void
79
79
}
80
80
81
81
/** @dataProvider provideTrueFalse */
82
- public static function testTrueFalse (bool $ bool ): void
82
+ public function testTrueOrFalse (bool $ bool ): void
83
83
{
84
84
static ::assertCount (1 , func_get_args ());
85
85
}
86
86
87
+ public function testTrueAndFalse (): void
88
+ {
89
+ static ::assertSame (
90
+ ['true ' => [true ], 'false ' => [false ]],
91
+ [...self ::provideTrueFalse ()],
92
+ );
93
+ }
94
+
87
95
public function testGetSysTempDir (): void
88
96
{
89
97
self ::assertFileExists ($ this ->getSysTempDir ());
You can’t perform that action at this time.
0 commit comments