File tree Expand file tree Collapse file tree 5 files changed +14
-13
lines changed Expand file tree Collapse file tree 5 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 11vendor
22composer.lock
3+ .phpunit.result.cache
Original file line number Diff line number Diff line change 99 ],
1010 "require" : {
1111 "php" : " ^5.6 || ^7.0" ,
12- "sebastian/diff" : " ^ 1.4"
12+ "sebastian/diff" : " >= 1.4 <4.0 "
1313 },
1414 "require-dev" : {
15- "phpunit/phpunit" : " ^ 5.5" ,
15+ "phpunit/phpunit" : " >= 5.5" ,
1616 "satooshi/php-coveralls" : " >=0.7.1 <2.0"
1717 },
1818 "autoload" : {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
2- <phpunit colors =" true" bootstrap =" ../ vendor/autoload.php" >
2+ <phpunit colors =" true" bootstrap =" vendor/autoload.php" >
33 <testsuites >
44 <testsuite name =" AllTests" >
5- <directory >./</directory >
5+ <directory >./tests </directory >
66 </testsuite >
77 </testsuites >
88 <filter >
99 <whitelist processUncoveredFilesFromWhitelist =" true" >
10- <directory suffix =" .php" >.. /src</directory >
10+ <directory suffix =" .php" >./src</directory >
1111 </whitelist >
1212 </filter >
1313</phpunit >
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ public function render(Change $change)
114114
115115 // render diff
116116 foreach ($ diff as &$ line ) {
117+ $ line [0 ] = trim ($ line [0 ]);
118+
117119 switch ($ line [1 ]) {
118120 case 0 : // NOT CHANGED
119121 $ line = $ line [0 ];
Original file line number Diff line number Diff line change @@ -119,23 +119,21 @@ public function testRender_ChangeValueHasStringType(
119119 $ this ->assertEquals ($ expectedDiff , $ actualDiff );
120120 }
121121
122- /**
123- * @expectedException \InvalidArgumentException
124- * @expectedExceptionMessage Invalid format specified
125- */
126122 public function testSetFormatWithInvalidType ()
127123 {
124+ $ this ->expectException ('\InvalidArgumentException ' );
125+ $ this ->expectExceptionMessage ('Invalid format specified ' );
126+
128127 $ diffRenderer = new Renderer ([]);
129128
130129 $ diffRenderer ->setFormat ('not_array_type ' );
131130 }
132131
133- /**
134- * @expectedException \InvalidArgumentException
135- * @expectedExceptionMessage Invalid format specified
136- */
137132 public function testSetFormatWithInvalidDefinedFormats ()
138133 {
134+ $ this ->expectException ('\InvalidArgumentException ' );
135+ $ this ->expectExceptionMessage ('Invalid format specified ' );
136+
139137 $ diffRenderer = new Renderer ([]);
140138
141139 $ diffRenderer ->setFormat (1000 );
You can’t perform that action at this time.
0 commit comments