1212use  PHPUnit \Framework \AssertionFailedError ;
1313use  PHPUnit \Framework \Constraint \IsEqual ;
1414use  PHPUnit \Framework \IncompleteTestError ;
15+ use  PHPUnit \Framework \SkippedTestError ;
1516use  PHPUnit \Framework \SkippedWithMessageException ;
17+ use  PHPUnit \Runner \Version  as  PHPUnitVersion ;
1618use  RuntimeException ;
1719use  stdClass ;
1820
@@ -46,14 +48,14 @@ public function testPHPUnitAsserts()
4648    {
4749        $ this module ->assertArrayHasKey ('one ' , ['one '  => 1 , 'two '  => 2 ]);
4850        $ this module ->assertArrayNotHasKey ('three ' , ['one '  => 1 , 'two '  => 2 ]);
49-         $ this module ->assertClassHasAttribute ('foo ' , \DummyClass::class);
50-         $ this module ->assertClassHasStaticAttribute ('staticFoo ' , \DummyClass::class);
51-         $ this module ->assertClassNotHasAttribute ('bar ' , \DummyClass::class);
52-         $ this module ->assertClassNotHasStaticAttribute ('staticBar ' , \DummyClass::class);
51+         $ this module ->assertClassHasAttribute ('foo ' , \Support \ Data \ DummyClass::class);
52+         $ this module ->assertClassHasStaticAttribute ('staticFoo ' , \Support \ Data \ DummyClass::class);
53+         $ this module ->assertClassNotHasAttribute ('bar ' , \Support \ Data \ DummyClass::class);
54+         $ this module ->assertClassNotHasStaticAttribute ('staticBar ' , \Support \ Data \ DummyClass::class);
5355        $ this module ->assertContains (1 , [1 , 2 ]);
5456        $ this module ->assertContainsEquals (2 , [1 , 2 ]);
55-         $ this module ->assertContainsOnly (\DummyClass::class, [new  \DummyClass (), new  \DummyClass ()]);
56-         $ this module ->assertContainsOnlyInstancesOf (\DummyClass::class, [new  \DummyClass (), new  \DummyClass ()]);
57+         $ this module ->assertContainsOnly (\Support \ Data \ DummyClass::class, [new  \Support \ Data \ DummyClass (), new  \ Support \ Data \DummyClass ()]);
58+         $ this module ->assertContainsOnlyInstancesOf (\Support \ Data \ DummyClass::class, [new  \Support \ Data \ DummyClass (), new  \ Support \ Data \DummyClass ()]);
5759        $ this module ->assertCount (3 , [1 , 2 , 3 ]);
5860        $ this module ->assertDirectoryDoesNotExist (__DIR__ .'notExist ' );
5961        $ this module ->assertDirectoryExists (__DIR__ );
@@ -130,7 +132,7 @@ public function testPHPUnitAsserts()
130132        $ this module ->assertNan (sqrt (-1 ));
131133        $ this module ->assertNotContains ('three ' , ['one ' , 'two ' ]);
132134        $ this module ->assertNotContainsEquals (3 , [1 , 2 ]);
133-         $ this module ->assertNotContainsOnly (\DummyClass::class, [new  \DummyClass (), new  Exception ()]);
135+         $ this module ->assertNotContainsOnly (\Support \ Data \ DummyClass::class, [new  \ Support \ Data \DummyClass (), new  Exception ()]);
134136        $ this module ->assertNotCount (1 , ['one ' , 'two ' ]);
135137        $ this module ->assertNotEmpty ([1 ]);
136138        $ this module ->assertNotEquals (true , false );
@@ -150,8 +152,8 @@ public function testPHPUnitAsserts()
150152        $ this module ->assertNotTrue (null );
151153        $ this module ->assertNotTrue ('foo ' );
152154        $ this module ->assertNull (null );
153-         $ this module ->assertObjectHasAttribute ('foo ' , new  \DummyClass ());
154-         $ this module ->assertObjectNotHasAttribute ('bar ' , new  \DummyClass ());
155+         $ this module ->assertObjectHasAttribute ('foo ' , new  \Support \ Data \ DummyClass ());
156+         $ this module ->assertObjectNotHasAttribute ('bar ' , new  \Support \ Data \ DummyClass ());
155157        $ this module ->assertSame (1 , 1 );
156158        $ this module ->assertSameSize ([1 , 2 , 3 ], [1 , 2 , 3 ]);
157159        $ this module ->assertStringContainsString ('bar ' , 'foobar ' );
@@ -280,8 +282,12 @@ public function testMarkTestIncomplete()
280282
281283    public  function  testMarkTestSkipped ()
282284    {
283-         $ this expectException (SkippedWithMessageException::class);
284285        $ this expectExceptionMessage ('foobar ' );
286+         if  (PHPUnitVersion::series () < 10 ) {
287+             $ this expectException (SkippedTestError::class);
288+         } else  {
289+             $ this expectException (SkippedWithMessageException::class);
290+         }
285291
286292        $ this module ->markTestSkipped ('foobar ' );
287293    }
0 commit comments