/** * validates isValid throws an exception when it doesn't get back a boolean. * * @author Daniel Sherman * @test * @depends testConstruct * @covers ::isValid */ public function testIsValidException() { $test = new Caller('implode'); try { $test->isValid(['One', 'Two', 'Three']); } catch (\Exception $e) { $this->assertInstanceOf('Flair\\Validation\\UnexpectedValueException', $e); $this->assertEquals(18, $e->getCode()); $this->assertEquals('The callable method did not return a boolean!', $e->getMessage()); return; } $this->fail('An exception was not thrown for a value'); }