GcConfig\Controller\UserControllerTest::testEditActionWithPostData PHP Méthode

testEditActionWithPostData() public méthode

Test
public testEditActionWithPostData ( ) : void
Résultat void
    public function testEditActionWithPostData()
    {
        $userModel = UserModel::fromArray(array('lastname' => 'Test', 'firstname' => 'Test', 'email' => '[email protected]', 'login' => 'testlogin', 'user_acl_role_id' => 2));
        $userModel->setPassword('passwordtest');
        $userModel->save();
        $this->dispatch('/admin/config/user/edit/' . $userModel->getId(), 'POST', array('lastname' => 'Test', 'firstname' => 'Test', 'email' => '[email protected]', 'login' => 'testlogin', 'user_acl_role_id' => 2, 'password' => 'test', 'password_confirm' => 'test'));
        $this->assertResponseStatusCode(302);
        $this->assertModuleName('GcConfig');
        $this->assertControllerName('UserController');
        $this->assertControllerClass('UserController');
        $this->assertMatchedRouteName('config/user/edit');
        $userModel->delete();
    }