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 1
1
vendor
2
2
composer.lock
3
+ .phpunit.result.cache
Original file line number Diff line number Diff line change 9
9
],
10
10
"require" : {
11
11
"php" : " ^5.6 || ^7.0" ,
12
- "sebastian/diff" : " ^ 1.4"
12
+ "sebastian/diff" : " >= 1.4 <4.0 "
13
13
},
14
14
"require-dev" : {
15
- "phpunit/phpunit" : " ^ 5.5" ,
15
+ "phpunit/phpunit" : " >= 5.5" ,
16
16
"satooshi/php-coveralls" : " >=0.7.1 <2.0"
17
17
},
18
18
"autoload" : {
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
- <phpunit colors =" true" bootstrap =" ../ vendor/autoload.php" >
2
+ <phpunit colors =" true" bootstrap =" vendor/autoload.php" >
3
3
<testsuites >
4
4
<testsuite name =" AllTests" >
5
- <directory >./</directory >
5
+ <directory >./tests </directory >
6
6
</testsuite >
7
7
</testsuites >
8
8
<filter >
9
9
<whitelist processUncoveredFilesFromWhitelist =" true" >
10
- <directory suffix =" .php" >.. /src</directory >
10
+ <directory suffix =" .php" >./src</directory >
11
11
</whitelist >
12
12
</filter >
13
13
</phpunit >
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ public function render(Change $change)
114
114
115
115
// render diff
116
116
foreach ($ diff as &$ line ) {
117
+ $ line [0 ] = trim ($ line [0 ]);
118
+
117
119
switch ($ line [1 ]) {
118
120
case 0 : // NOT CHANGED
119
121
$ line = $ line [0 ];
Original file line number Diff line number Diff line change @@ -119,23 +119,21 @@ public function testRender_ChangeValueHasStringType(
119
119
$ this ->assertEquals ($ expectedDiff , $ actualDiff );
120
120
}
121
121
122
- /**
123
- * @expectedException \InvalidArgumentException
124
- * @expectedExceptionMessage Invalid format specified
125
- */
126
122
public function testSetFormatWithInvalidType ()
127
123
{
124
+ $ this ->expectException ('\InvalidArgumentException ' );
125
+ $ this ->expectExceptionMessage ('Invalid format specified ' );
126
+
128
127
$ diffRenderer = new Renderer ([]);
129
128
130
129
$ diffRenderer ->setFormat ('not_array_type ' );
131
130
}
132
131
133
- /**
134
- * @expectedException \InvalidArgumentException
135
- * @expectedExceptionMessage Invalid format specified
136
- */
137
132
public function testSetFormatWithInvalidDefinedFormats ()
138
133
{
134
+ $ this ->expectException ('\InvalidArgumentException ' );
135
+ $ this ->expectExceptionMessage ('Invalid format specified ' );
136
+
139
137
$ diffRenderer = new Renderer ([]);
140
138
141
139
$ diffRenderer ->setFormat (1000 );
You can’t perform that action at this time.
0 commit comments