/** * Checks in current instance is representing the given value * * @param integer $id * @return boolean * @throws IdentifierException */ public function is($id) { if (!is_int($id)) { throw IdentifierException::make('Only integer values allowed!'); } return $this->id == $id; }
public function testMake() { $ex = IdentifierException::make(); $this->assertInstanceOf('Identifier\\Exception\\IdentifierException', $ex); $this->assertEquals('Unknown exception', $ex->getMessage()); }