@@ -34,7 +34,7 @@ public function testWrongConvertDirs($path, $expectedMessage, $expectedException
3434 $ exception = $ e ->getMessage ();
3535 $ exceptionClass = \get_class ($ e );
3636 }
37- static ::assertContains ($ expectedMessage , $ exception );
37+ static ::assertStringContainsString ($ expectedMessage , $ exception );
3838 static ::assertEquals ($ expectedException , $ exceptionClass );
3939 }
4040
@@ -236,7 +236,7 @@ public function testConvertIdentifyImage($imageToIdentify, $expectedFormat, $exp
236236
237237 $ content = $ response ->getOutput ();
238238
239- static ::assertContains (\sprintf (
239+ static ::assertStringContainsString (\sprintf (
240240 '%s %s %s %s %s ' ,
241241 $ imageToIdentify ,
242242 $ expectedFormat ,
@@ -321,11 +321,10 @@ public function provideTestCommandString(): ?\Generator
321321 yield [$ this ->resourcesDir .'/moon_180.jpg ' , $ this ->resourcesDir .'/outputs/moon_geometry.jpg ' , '30x30+20+20 ' , 50 ];
322322 }
323323
324- /**
325- * @expectedException \InvalidArgumentException
326- */
327324 public function testWrongExecutable (): void
328325 {
326+ $ this ->expectException (\InvalidArgumentException::class);
327+
329328 $ command = new Command (IMAGEMAGICK_DIR );
330329 $ command ->getExecutable ('this_executable_might_not_exist ' );
331330 }
@@ -341,6 +340,6 @@ public function testInexistingFiles(): void
341340 } catch (\Exception $ e ) {
342341 $ exception = $ e ->getMessage ();
343342 }
344- static ::assertContains (\sprintf ('The file "%s" is not found. ' , $ file ), $ exception );
343+ static ::assertStringContainsString (\sprintf ('The file "%s" is not found. ' , $ file ), $ exception );
345344 }
346345}
0 commit comments