File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 6
6
7
7
class PhpmndXmlDiffFilterTest extends TestCase
8
8
{
9
+ /** @var PhpMndXmlLoader */
10
+ private $ mnd ;
9
11
10
- public function testValidFiles ()
12
+ public function setUp ()
11
13
{
14
+ parent ::setUp ();
12
15
$ file = __DIR__ . "/fixtures/phpmnd.xml " ;
13
- $ mnd = new PhpMndXmlLoader ($ file );
14
- $ files = $ mnd ->parseLines ();
16
+ $ this ->mnd = new PhpMndXmlLoader ($ file );
17
+ }
18
+
19
+ public function testValidFiles ()
20
+ {
21
+ $ files = $ this ->mnd ->parseLines ();
15
22
$ expected = [
16
23
'bin/test/test.php ' ,
17
24
'bin/test/test2.php ' ,
@@ -23,15 +30,18 @@ public function testValidFiles()
23
30
24
31
public function testShowsErrorOnLine ()
25
32
{
26
- $ file = __DIR__ . "/fixtures/phpmnd.xml " ;
27
- $ mnd = new PhpMndXmlLoader ($ file );
28
- $ mnd ->parseLines ();
33
+ $ this ->mnd ->parseLines ();
29
34
30
35
$ this ->assertNotEmpty (
31
- $ mnd ->getErrorsOnLine ('bin/test/test.php ' , 3 )
36
+ $ this -> mnd ->getErrorsOnLine ('bin/test/test.php ' , 3 )
32
37
);
33
38
$ this ->assertEmpty (
34
- $ mnd ->getErrorsOnLine ('bin/test/test.php ' , 1 )
39
+ $ this -> mnd ->getErrorsOnLine ('bin/test/test.php ' , 1 )
35
40
);
36
41
}
42
+
43
+ public function testFileNotFound ()
44
+ {
45
+ $ this ->assertTrue ($ this ->mnd ->handleNotFoundFile ());
46
+ }
37
47
}
You can’t perform that action at this time.
0 commit comments