コード例 #1
0
ファイル: FormHandlerTest.php プロジェクト: andyvenus/form
 public function testSaveToAndGetClonedEntities()
 {
     $entity = new StandardFormEntity();
     $entity->setName('Name One');
     $entity->setDescription('Description One');
     $entity->setCategory('5');
     $entity->setPassword('Secure One');
     $this->standard_form_handler->bindEntity($entity);
     $_POST = $this->standard_form_request;
     $this->standard_form_handler->handleRequest();
     $clones = $this->standard_form_handler->saveToAndGetClonedEntities();
     $this->assertEquals('Name One', $entity->getName());
     $this->assertEquals('Example Name', $clones[0]['entity']->getName());
 }