File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -1008,22 +1008,20 @@ public function provideDiffWithLineNumbers(): array
1008
1008
1009
1009
public function testConstructorNull ()
1010
1010
{
1011
- $ diff = new Differ (null );
1012
- $ reflection = new \ReflectionObject ($ diff );
1013
- $ property = $ reflection ->getProperty ('outputBuilder ' );
1014
- $ property ->setAccessible (true );
1015
-
1016
- $ this ->assertInstanceOf (UnifiedDiffOutputBuilder::class, $ property ->getValue ($ diff ));
1011
+ $ this ->assertAttributeInstanceOf (
1012
+ UnifiedDiffOutputBuilder::class,
1013
+ 'outputBuilder ' ,
1014
+ new Differ (null )
1015
+ );
1017
1016
}
1018
1017
1019
1018
public function testConstructorString ()
1020
1019
{
1021
- $ diff = new Differ ("--- Original \n+++ New \n" );
1022
- $ reflection = new \ReflectionObject ($ diff );
1023
- $ property = $ reflection ->getProperty ('outputBuilder ' );
1024
- $ property ->setAccessible (true );
1025
-
1026
- $ this ->assertInstanceOf (UnifiedDiffOutputBuilder::class, $ property ->getValue ($ diff ));
1020
+ $ this ->assertAttributeInstanceOf (
1021
+ UnifiedDiffOutputBuilder::class,
1022
+ 'outputBuilder ' ,
1023
+ new Differ ("--- Original \n+++ New \n" )
1024
+ );
1027
1025
}
1028
1026
1029
1027
public function testConstructorInvalidArgInt ()
You can’t perform that action at this time.
0 commit comments