Exemplo n.º 1
0
 /**
  * @expectedException \Rio\Exception
  * @expectedExceptionMessage Invalid value for property "number" (not an integer value)
  */
 public function testValidationForNonIntegerValue()
 {
     $this->entity->setNumber('string');
 }
Exemplo n.º 2
0
 public function testGettingRelatedEntity()
 {
     $entity = new Dummy($this->adapter, 1);
     $entity->setNumber(2);
     $this->assertInstanceOf('\\Rio\\Persistence\\Entity\\Dummy', $entity->getRelation());
     $this->assertEquals('adam', $entity->getFirstName());
     $this->assertEquals('eve', $entity->getRelation()->getFirstName());
 }