1 | <?php |
||
20 | class ConcernedAboutSeparationTest extends TestCase |
||
21 | { |
||
22 | /** |
||
23 | * @var Filesystem |
||
24 | */ |
||
25 | private $filesystem; |
||
26 | |||
27 | /** |
||
28 | * @var Generator |
||
29 | */ |
||
30 | private $faker; |
||
31 | |||
32 | /** |
||
33 | * @var Parser |
||
34 | */ |
||
35 | private $parser; |
||
36 | |||
37 | public function setUp() |
||
43 | |||
44 | public function testConcernedAboutSeparationExercise() |
||
55 | |||
56 | public function testGetArgsCreatesFilesAndReturnsRandomExt() |
||
57 | { |
||
58 | $e = new ConcernedAboutSeparation($this->filesystem, $this->faker, $this->parser); |
||
59 | $args = $e->getArgs(); |
||
60 | $path = $args[0]; |
||
61 | $this->assertFileExists($path); |
||
62 | |||
63 | $files = [ |
||
64 | "learnyouphp.dat", |
||
65 | "learnyouphp.txt", |
||
66 | "learnyouphp.sql", |
||
67 | "api.html", |
||
68 | "README.md", |
||
69 | "CHANGELOG.md", |
||
70 | "LICENCE.md", |
||
71 | "md", |
||
72 | "data.json", |
||
73 | "data.dat", |
||
74 | "words.dat", |
||
75 | "w00t.dat", |
||
76 | "w00t.txt", |
||
77 | "wrrrrongdat", |
||
78 | "dat", |
||
79 | ]; |
||
80 | |||
81 | array_walk($files, function ($file) use ($path) { |
||
82 | $this->assertFileExists(sprintf('%s/%s', $path, $file)); |
||
83 | }); |
||
84 | |||
85 | $extensions = array_unique(array_map(function ($file) { |
||
86 | return pathinfo($file, PATHINFO_EXTENSION); |
||
87 | }, $files)); |
||
88 | |||
89 | $this->assertTrue(in_array($args[1], $extensions)); |
||
90 | } |
||
91 | |||
92 | public function testTearDownRemovesFile() |
||
103 | |||
104 | public function testCheckReturnsFailureIfNoIncludeFoundInSolution() |
||
115 | |||
116 | public function testCheckReturnsSuccessIfIncludeFound() |
||
126 | } |
||
127 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..