Exemplo n.º 1
0
 public function testEditWithDataAction()
 {
     $table = new Blog_Model_Post_Table();
     $manager = new Blog_Model_Category_Manager();
     $rootCat = $manager->getRoot();
     $cat = $manager->getDbTable()->createRow($this->_fixture['category']);
     $rootCat->addChild($cat);
     $post = $table->createRow($this->_fixture['post']);
     $post->save();
     $this->_doLogin();
     $this->request->setMethod('POST')->setPost(array('title' => 'tttttttt', 'body' => 'tttttttt', 'categoryId' => 93, 'status' => 'draft'));
     $this->dispatch('/blog/post/edit/alias/' . $this->_fixture['post']['alias']);
     $this->assertModule('blog');
     $this->assertController('post');
     $this->assertAction('edit');
     $post->delete();
     $cat->delete();
 }