@@ -42,7 +42,7 @@ public function testCorrectResponseCodeInErrorView(): void
4242Exception: yii\web\NotFoundHttpException ' , $ out );
4343 }
4444
45- public function testFormatRaw ()
45+ public function testFormatRaw (): void
4646 {
4747 Yii::$ app ->response ->format = yii \web \Response::FORMAT_RAW ;
4848
@@ -53,13 +53,16 @@ public function testFormatRaw()
5353 $ this ->invokeMethod ($ handler , 'renderException ' , [new \Exception ('Test Exception ' )]);
5454 $ out = ob_get_clean ();
5555
56- $ this ->assertcontains ('Test Exception ' , $ out );
56+ $ this ->assertStringContainsString ('Test Exception ' , $ out );
5757
5858 $ this ->assertTrue (is_string (Yii::$ app ->response ->data ));
59- $ this ->assertcontains ("Exception 'Exception' with message 'Test Exception' " , Yii::$ app ->response ->data );
59+ $ this ->assertStringContainsString (
60+ "Exception 'Exception' with message 'Test Exception' " ,
61+ Yii::$ app ->response ->data ,
62+ );
6063 }
6164
62- public function testFormatXml ()
65+ public function testFormatXml (): void
6366 {
6467 Yii::$ app ->response ->format = yii \web \Response::FORMAT_XML ;
6568
@@ -70,7 +73,7 @@ public function testFormatXml()
7073 $ this ->invokeMethod ($ handler , 'renderException ' , [new \Exception ('Test Exception ' )]);
7174 $ out = ob_get_clean ();
7275
73- $ this ->assertcontains ('Test Exception ' , $ out );
76+ $ this ->assertStringContainsString ('Test Exception ' , $ out );
7477
7578 $ outArray = Yii::$ app ->response ->data ;
7679
@@ -80,12 +83,12 @@ public function testFormatXml()
8083 $ this ->assertEquals ('Test Exception ' , $ outArray ['message ' ]);
8184 $ this ->assertArrayHasKey ('code ' , $ outArray );
8285 $ this ->assertEquals ('Exception ' , $ outArray ['type ' ]);
83- $ this ->assertContains ('ErrorHandlerTest.php ' , $ outArray ['file ' ]);
86+ $ this ->assertStringContainsString ('ErrorHandlerTest.php ' , $ outArray ['file ' ]);
8487 $ this ->assertArrayHasKey ('stack-trace ' , $ outArray );
8588 $ this ->assertArrayHasKey ('line ' , $ outArray );
8689 }
8790
88- public function testClearAssetFilesInErrorView ()
91+ public function testClearAssetFilesInErrorView (): void
8992 {
9093 Yii::$ app ->getView ()->registerJsFile ('somefile.js ' );
9194 /** @var ErrorHandler $handler */
@@ -123,7 +126,7 @@ public function testRenderCallStackItem(): void
123126 $ this ->assertStringContainsString ('<a href="netbeans://open?file= ' . $ file . '&line=63"> ' , $ out );
124127 }
125128
126- public static function dataHtmlEncode ()
129+ public static function dataHtmlEncode (): array
127130 {
128131 return [
129132 [
0 commit comments