diff --git a/tests/unit/Framework/AssertTest.php b/tests/unit/Framework/AssertTest.php index 8fa34c3b46f..d00c6cb4fba 100644 --- a/tests/unit/Framework/AssertTest.php +++ b/tests/unit/Framework/AssertTest.php @@ -113,6 +113,20 @@ public function testAssertContainsEmptyStringInString(): void $this->assertContains('', 'test'); } + public function testAssertStringContainsNonString(): void + { + $this->expectException(Exception::class); + + $this->assertContains(null, ''); + } + + public function testAssertStringNotContainsNonString(): void + { + $this->expectException(Exception::class); + + $this->assertNotContains(null, ''); + } + public function testAssertArrayHasKeyThrowsExceptionForInvalidFirstArgument(): void { $this->expectException(Exception::class);