@@ -54,37 +54,37 @@ public function testHandle()
5454 $ request = Request::create ('/r/bd04a611ed6d/css/test.css ' );
5555 $ response = $ dispatch ->handleRequest ($ request );
5656 $ this ->assertEquals (200 , $ response ->getStatusCode ());
57- $ this ->assertContains ('url(r/395d1a0e8999/img/x.jpg) ' , $ response ->getContent ());
57+ $ this ->assertStringContainsString ('url(r/395d1a0e8999/img/x.jpg) ' , $ response ->getContent ());
5858
5959 $ uri = ResourceManager::public ()->getResourceUri ('css/placeholder.css ' );
6060 $ request = Request::create ($ uri );
6161 $ response = $ dispatch ->handleRequest ($ request );
62- $ this ->assertContains ('font-size:14px ' , $ response ->getContent ());
63- $ this ->assertContains ('background:url(p/942e325b1780/img/test.svg#test) ' , $ response ->getContent ());
62+ $ this ->assertStringContainsString ('font-size:14px ' , $ response ->getContent ());
63+ $ this ->assertStringContainsString ('background:url(p/942e325b1780/img/test.svg#test) ' , $ response ->getContent ());
6464
6565 $ dispatch ->addAlias ('abc ' , 'resources/css ' );
6666 $ request = Request::create ('/a/abc/bd04a611ed6d/test.css ' );
6767 $ response = $ dispatch ->handleRequest ($ request );
68- $ this ->assertContains ('url("a/abc/942e325be95f/sub/subimg.jpg") ' , $ response ->getContent ());
68+ $ this ->assertStringContainsString ('url("a/abc/942e325be95f/sub/subimg.jpg") ' , $ response ->getContent ());
6969
7070 $ uri = ResourceManager::vendor ('packaged ' , 'dispatch ' )->getResourceUri ('css/vendor.css ' );
7171 $ request = Request::create ($ uri );
7272 $ response = $ dispatch ->handleRequest ($ request );
73- $ this ->assertContains ('body{background:orange} ' , $ response ->getContent ());
73+ $ this ->assertStringContainsString ('body{background:orange} ' , $ response ->getContent ());
7474
7575 $ dispatch ->addVendorAlias ('packaged ' , 'dispatch ' , 'pdsp ' );
7676 $ uri = ResourceManager::vendor ('packaged ' , 'dispatch ' )->getResourceUri ('css/vendor.css ' );
77- self ::assertContains ('v/pdsp ' , $ uri );
77+ self ::assertStringContainsString ('v/pdsp ' , $ uri );
7878 $ request = Request::create ($ uri );
7979 $ response = $ dispatch ->handleRequest ($ request );
80- $ this ->assertContains ('body{background:orange} ' , $ response ->getContent ());
80+ $ this ->assertStringContainsString ('body{background:orange} ' , $ response ->getContent ());
8181
8282 Dispatch::instance ()->config ()->addItem ('ext.css ' , 'sourcemap ' , true );
8383 $ uri = ResourceManager::vendor ('packaged ' , 'dispatch ' )->getResourceUri ('css/vendor.css ' );
8484 $ request = Request::create ($ uri );
8585 $ response = $ dispatch ->handleRequest ($ request );
86- $ this ->assertContains ('sourceMappingURL ' , $ response ->getContent ());
87- $ this ->assertContains ('Q1NTLU1BUAo ' , $ response ->getContent ());
86+ $ this ->assertStringContainsString ('sourceMappingURL ' , $ response ->getContent ());
87+ $ this ->assertStringContainsString ('Q1NTLU1BUAo ' , $ response ->getContent ());
8888
8989 Dispatch::destroy ();
9090 }
@@ -95,7 +95,10 @@ public function testBaseUri()
9595 Dispatch::bind ($ dispatch );
9696 $ request = Request::create ('/r/bd04a611ed6d/css/test.css ' );
9797 $ response = $ dispatch ->handleRequest ($ request );
98- $ this ->assertContains ('url(http://assets.packaged.in/r/395d1a0e8999/img/x.jpg) ' , $ response ->getContent ());
98+ $ this ->assertStringContainsString (
99+ 'url(http://assets.packaged.in/r/395d1a0e8999/img/x.jpg) ' ,
100+ $ response ->getContent ()
101+ );
99102 Dispatch::destroy ();
100103 }
101104
@@ -105,10 +108,10 @@ public function testStore()
105108 ResourceManager::resources ()->requireCss ('css/test.css ' );
106109 ResourceManager::resources ()->requireCss ('css/do-not-modify.css ' );
107110 $ response = Dispatch::instance ()->store ()->generateHtmlIncludes (ResourceStore::TYPE_CSS );
108- $ this ->assertContains ('href="http://assets.packaged.in/r/bd04a6113c11/css/test.css" ' , $ response );
111+ $ this ->assertStringContainsString ('href="http://assets.packaged.in/r/bd04a6113c11/css/test.css" ' , $ response );
109112 ResourceManager::resources ()->requireJs ('js/alert.js ' );
110113 $ response = Dispatch::instance ()->store ()->generateHtmlIncludes (ResourceStore::TYPE_JS );
111- $ this ->assertContains ('src="http://assets.packaged.in/r/f417133ec50f/js/alert.js" ' , $ response );
114+ $ this ->assertStringContainsString ('src="http://assets.packaged.in/r/f417133ec50f/js/alert.js" ' , $ response );
112115 Dispatch::destroy ();
113116 }
114117
@@ -166,11 +169,11 @@ public function testWebpReplacements()
166169
167170 $ request = Request::create (ResourceManager::resources ()->getResourceUri ('css/webptest.css ' ));
168171 $ response = $ dispatch ->handleRequest ($ request );
169- $ this ->assertContains (
172+ $ this ->assertStringContainsString (
170173 'url(http://assets.packaged.in/r/30c60da9f504/img/test-sample.png?abc=def#xyz) ' ,
171174 $ response ->getContent ()
172175 );
173- $ this ->assertNotContains (
176+ $ this ->assertStringNotContainsString (
174177 'url(http://assets.packaged.in/r/30c60da9f504/img/test-sample.png.webp?abc=def#xyz) ' ,
175178 $ response ->getContent ()
176179 );
@@ -182,11 +185,11 @@ public function testWebpReplacements()
182185 $ request = Request::create (ResourceManager::resources ()->getResourceUri ('css/webptest.css ' ));
183186 $ response = $ dispatch ->handleRequest ($ request );
184187
185- $ this ->assertNotContains (
188+ $ this ->assertStringNotContainsString (
186189 'url(http://assets.packaged.in/r/30c60da9f504-1/img/test-sample.png?abc=def#xyz) ' ,
187190 $ response ->getContent ()
188191 );
189- $ this ->assertContains (
192+ $ this ->assertStringContainsString (
190193 'url(http://assets.packaged.in/r/d6e2937fee66-1/img/test-sample.png.webp?abc=def#xyz) ' ,
191194 $ response ->getContent ()
192195 );
0 commit comments