diff --git a/lib/Assert/Assertion.php b/lib/Assert/Assertion.php index ea9bb9d2..7acdb2d4 100644 --- a/lib/Assert/Assertion.php +++ b/lib/Assert/Assertion.php @@ -1586,7 +1586,7 @@ public static function classExists($value, $message = null, $propertyPath = null */ public static function interfaceExists($value, $message = null, $propertyPath = null) { - if (! class_exists($value)) { + if (! interface_exists($value)) { $message = sprintf( $message ?: 'Interface "%s" does not exist.', static::stringify($value) diff --git a/tests/Assert/Tests/AssertTest.php b/tests/Assert/Tests/AssertTest.php index cfd32c0c..4e2b844a 100644 --- a/tests/Assert/Tests/AssertTest.php +++ b/tests/Assert/Tests/AssertTest.php @@ -1444,8 +1444,7 @@ public function testInvalidInterfaceExists() public function testValidInterfaceExists() { - $this->setExpectedException('Assert\AssertionFailedException', null, Assertion::INVALID_INTERFACE); - Assertion::interfaceExists("\\Countable"); + $this->assertTrue(Assertion::interfaceExists("\\Countable")); } /**