public function testNewActionCancel() { $this->createsModels = true; $modelCount = count($this->getModels()); $post = array('Name' => 'TestName', 'City' => 'TestCity', 'Cancel' => 'Abbrechen'); $this->getRequest()->setPost($post)->setMethod('POST'); $this->dispatch('/admin/dnbinstitute/new'); $this->assertRedirectTo('/admin/dnbinstitute', 'Should be a redirect to index action.'); $this->assertEquals($modelCount, count(Opus_DnbInstitute::getAll()), 'Es sollte keine neue Sprache geben.'); }