GcDevelopment\Controller\DocumentTypeControllerTest::testCreateActionWithPostData PHP Méthode

testCreateActionWithPostData() public méthode

Test
public testCreateActionWithPostData ( ) : void
Résultat void
    public function testCreateActionWithPostData()
    {
        $viewModel = ViewModel::fromArray(array('name' => 'Test', 'identifier' => 'Test', 'content' => 'Test'));
        $viewModel->save();
        $datatypeModel = DatatypeModel::fromArray(array('name' => 'DatatypeTest', 'model' => 'Textstring'));
        $datatypeModel->save();
        $this->dispatch('/admin/development/document-type/create', 'POST', array('infos' => array('icon_id' => 3, 'name' => 'test development'), 'views' => array('default_view' => $viewModel->getId()), 'properties' => array('property1' => array('datatype' => $datatypeModel->getId(), 'identifier' => 'test', 'description' => 'test', 'name' => 'test', 'tab' => 21), 'wrongId' => array('datatype' => $datatypeModel->getId(), 'identifier' => 'test', 'description' => 'test', 'name' => 'test', 'tab' => 21)), 'tabs' => array('tab21' => array('description' => 'test', 'name' => 'test'), 'wrongId' => array('description' => 'test', 'name' => 'test'))));
        $this->assertResponseStatusCode(302);
        $this->assertModuleName('GcDevelopment');
        $this->assertControllerName('DocumentTypeController');
        $this->assertControllerClass('DocumentTypeController');
        $this->assertMatchedRouteName('development/document-type/create');
        $viewModel->delete();
        $datatypeModel->delete();
    }