This repository was archived by the owner on Aug 19, 2025. It is now read-only.
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
10081008
10091009 public function testConstructorNull ()
10101010 {
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+ );
10171016 }
10181017
10191018 public function testConstructorString ()
10201019 {
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+ );
10271025 }
10281026
10291027 public function testConstructorInvalidArgInt ()
You can’t perform that action at this time.
0 commit comments