public function testGetCreateSQLWithFloatDataFromAnnotatedEntity() { $this->annotatedTest->setString("some string"); $this->annotatedTest->setFloat(0.019284); $sql = $this->annotatedTableData->getCreateSQL($this->annotatedTest); $this->assertEqualsFixture($sql, __FUNCTION__, $this->annotatedTest->getId()); $this->runQuery($sql); }
public function testCanUpdateChildElementWithoutLoosingParentFK() { $this->entity->setOneToManyChild(array(new ChildTest())); $this->annotatedTestDao->create($this->entity); $this->entity = $this->annotatedTestDao->find($this->entity->getId()); $this->assertEquals(1, count($this->entity->getOneToManyChild())); $child = current($this->entity->getOneToManyChild()); $child->setData('something updated'); $this->childTestDao->update($child); $this->annotatedTestDao->refresh($this->entity); $this->assertEquals(1, count($this->entity->getOneToManyChild())); }