diff --git a/tests/system/Cache/ResponseCacheTest.php b/tests/system/Cache/ResponseCacheTest.php index d22f2a7683..11c82db712 100644 --- a/tests/system/Cache/ResponseCacheTest.php +++ b/tests/system/Cache/ResponseCacheTest.php @@ -128,7 +128,7 @@ final class ResponseCacheTest extends CIUnitTestCase $cachedResponse = $pageCache->get($request, new Response($this->appConfig)); - $this->assertNull($cachedResponse); + $this->assertNotInstanceOf(ResponseInterface::class, $cachedResponse); } public function testCachePageIncomingRequestWithCacheQueryString(): void @@ -159,14 +159,14 @@ final class ResponseCacheTest extends CIUnitTestCase $request = $this->createIncomingRequest('foo/bar', ['xfoo' => 'bar', 'bar' => 'baz']); $cachedResponse = $pageCache->get($request, new Response($this->appConfig)); - $this->assertNull($cachedResponse); + $this->assertNotInstanceOf(ResponseInterface::class, $cachedResponse); // Check cache with another request with the different URI path. $request = $this->createIncomingRequest('another'); $cachedResponse = $pageCache->get($request, new Response($this->appConfig)); - $this->assertNull($cachedResponse); + $this->assertNotInstanceOf(ResponseInterface::class, $cachedResponse); } public function testCachePageIncomingRequestWithHttpMethods(): void @@ -186,7 +186,7 @@ final class ResponseCacheTest extends CIUnitTestCase $request = $this->createIncomingRequest('foo/bar')->withMethod('POST'); $cachedResponse = $pageCache->get($request, new Response($this->appConfig)); - $this->assertNull($cachedResponse); + $this->assertNotInstanceOf(ResponseInterface::class, $cachedResponse); } public function testCachePageCLIRequest(): void @@ -214,7 +214,7 @@ final class ResponseCacheTest extends CIUnitTestCase $cachedResponse = $pageCache->get($request, new Response($this->appConfig)); - $this->assertNull($cachedResponse); + $this->assertNotInstanceOf(ResponseInterface::class, $cachedResponse); } public function testUnserializeError(): void diff --git a/tests/system/Filters/CorsTest.php b/tests/system/Filters/CorsTest.php index 5e25af0572..1cbf471821 100644 --- a/tests/system/Filters/CorsTest.php +++ b/tests/system/Filters/CorsTest.php @@ -102,7 +102,7 @@ final class CorsTest extends CIUnitTestCase $return = $this->cors->before($cliRequest); - $this->assertNull($return); + $this->assertNotInstanceOf(ResponseInterface::class, $return); } private function assertHeader(string $name, string $value): void diff --git a/tests/system/HTTP/Files/FileCollectionTest.php b/tests/system/HTTP/Files/FileCollectionTest.php index 3e502f7afe..7be7fcfe54 100644 --- a/tests/system/HTTP/Files/FileCollectionTest.php +++ b/tests/system/HTTP/Files/FileCollectionTest.php @@ -524,7 +524,7 @@ final class FileCollectionTest extends CIUnitTestCase $collection = new FileCollection(); $file = $collection->getFile('fileuser'); - $this->assertNull($file); + $this->assertNotInstanceOf(UploadedFile::class, $file); } public function testFileReturnValidMultipleFiles(): void @@ -686,7 +686,7 @@ final class FileCollectionTest extends CIUnitTestCase $collection = new FileCollection(); $this->assertFalse($collection->hasFile('my-form.detailz.avatars.0')); - $this->assertNull($collection->getFile('my-form.detailz.avatars.0')); + $this->assertNotInstanceOf(UploadedFile::class, $collection->getFile('my-form.detailz.avatars.0')); } public function testGetFileMultipleHasNoFile(): void diff --git a/tests/system/HTTP/ResponseTest.php b/tests/system/HTTP/ResponseTest.php index eeac917c7c..bea0944599 100644 --- a/tests/system/HTTP/ResponseTest.php +++ b/tests/system/HTTP/ResponseTest.php @@ -495,7 +495,7 @@ final class ResponseTest extends CIUnitTestCase $actual = $response->download(); - $this->assertNull($actual); + $this->assertNotInstanceOf(DownloadResponse::class, $actual); } public function testPretendMode(): void diff --git a/tests/system/Images/GDHandlerTest.php b/tests/system/Images/GDHandlerTest.php index 836f4f2cf0..121ce04090 100644 --- a/tests/system/Images/GDHandlerTest.php +++ b/tests/system/Images/GDHandlerTest.php @@ -411,7 +411,7 @@ final class GDHandlerTest extends CIUnitTestCase $this->handler->withFile($this->origin . 'ci-logo.jpeg'); $this->handler->convert(IMAGETYPE_PNG); $this->handler->save($this->start . 'work/ci-logo.png'); - $this->assertSame(exif_imagetype($this->start . 'work/ci-logo.png'), IMAGETYPE_PNG); + $this->assertSame(IMAGETYPE_PNG, exif_imagetype($this->start . 'work/ci-logo.png')); } public function testImageConvertPngToWebp(): void @@ -420,7 +420,7 @@ final class GDHandlerTest extends CIUnitTestCase $this->handler->convert(IMAGETYPE_WEBP); $saved = $this->start . 'work/rocket.webp'; $this->handler->save($saved); - $this->assertSame(exif_imagetype($saved), IMAGETYPE_WEBP); + $this->assertSame(IMAGETYPE_WEBP, exif_imagetype($saved)); } public function testImageReorientLandscape(): void diff --git a/tests/system/Images/ImageMagickHandlerTest.php b/tests/system/Images/ImageMagickHandlerTest.php index c189929ded..14cb4bc579 100644 --- a/tests/system/Images/ImageMagickHandlerTest.php +++ b/tests/system/Images/ImageMagickHandlerTest.php @@ -447,7 +447,7 @@ final class ImageMagickHandlerTest extends CIUnitTestCase $this->handler->withFile($this->origin . 'ci-logo.jpeg'); $this->handler->convert(IMAGETYPE_PNG); $this->handler->save($this->root . 'ci-logo.png'); - $this->assertSame(exif_imagetype($this->root . 'ci-logo.png'), IMAGETYPE_PNG); + $this->assertSame(IMAGETYPE_PNG, exif_imagetype($this->root . 'ci-logo.png')); } public function testImageReorientLandscape(): void