Beispiel #1
0
 public function testIntFail()
 {
     $factory = new Factory();
     $mapping = $factory->int();
     $this->setExpectedException('Mapped\\ValidationException');
     try {
         $mapping->apply('12a');
     } catch (ValidationException $e) {
         $errors = $e->getErrors();
         $this->assertSame('error.int', $errors[0]->getMessage());
         throw $e;
     }
 }