diff --git a/tests/system/Cache/ResponseCacheTest.php b/tests/system/Cache/ResponseCacheTest.php index d22f2a7683f4..11c82db71247 100644 --- a/tests/system/Cache/ResponseCacheTest.php +++ b/tests/system/Cache/ResponseCacheTest.php @@ -128,7 +128,7 @@ public function testCachePageIncomingRequest(): void $cachedResponse = $pageCache->get($request, new Response($this->appConfig)); - $this->assertNull($cachedResponse); + $this->assertNotInstanceOf(ResponseInterface::class, $cachedResponse); } public function testCachePageIncomingRequestWithCacheQueryString(): void @@ -159,14 +159,14 @@ public function testCachePageIncomingRequestWithCacheQueryString(): void $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 @@ public function testCachePageIncomingRequestWithHttpMethods(): void $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 @@ public function testCachePageCLIRequest(): void $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 5e25af0572f2..1cbf4718212f 100644 --- a/tests/system/Filters/CorsTest.php +++ b/tests/system/Filters/CorsTest.php @@ -102,7 +102,7 @@ public function testBeforeDoesNothingWhenCliRequest(): void $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 3e502f7afec4..7be7fcfe546e 100644 --- a/tests/system/HTTP/Files/FileCollectionTest.php +++ b/tests/system/HTTP/Files/FileCollectionTest.php @@ -524,7 +524,7 @@ public function testFileNoExistSingleFile(): void $collection = new FileCollection(); $file = $collection->getFile('fileuser'); - $this->assertNull($file); + $this->assertNotInstanceOf(UploadedFile::class, $file); } public function testFileReturnValidMultipleFiles(): void @@ -686,7 +686,7 @@ public function testDoesntHaveFile(): void $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 eeac917c7c64..bea0944599d8 100644 --- a/tests/system/HTTP/ResponseTest.php +++ b/tests/system/HTTP/ResponseTest.php @@ -495,7 +495,7 @@ public function testVagueDownload(): void $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 836f4f2cf05d..121ce040904a 100644 --- a/tests/system/Images/GDHandlerTest.php +++ b/tests/system/Images/GDHandlerTest.php @@ -411,7 +411,7 @@ public function testImageConvert(): void $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 @@ public function testImageConvertPngToWebp(): void $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 c189929dedb7..14cb4bc57980 100644 --- a/tests/system/Images/ImageMagickHandlerTest.php +++ b/tests/system/Images/ImageMagickHandlerTest.php @@ -447,7 +447,7 @@ public function testImageConvert(): void $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