From bac4fa595391a62963fa6c20562d98d9b1b5061d Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Mon, 19 Nov 2018 18:01:24 +0100 Subject: [PATCH] Add tests --- tests/unit/Framework/AssertTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/unit/Framework/AssertTest.php b/tests/unit/Framework/AssertTest.php index 8736de25894..fa7e09c74f0 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);