Scalr\Tests\Functional\Ui\Controller\Account\UsersTest::testXSaveAcion PHP Метод

testXSaveAcion() публичный Метод

public testXSaveAcion ( )
    public function testXSaveAcion()
    {
        if (!$this->getUser()->canManageAcl()) {
            $this->markTestSkipped('Specified test user is not allowed to manage users.');
        }
        $username = self::getTestName(self::USER_FULLNAME);
        $userEmail = self::_getCreatedUserEmail();
        $response = $this->internalRequest('/account/users/xSave', array('email' => $userEmail, 'fullname' => $username, 'password' => \Scalr::GenerateSecurePassword(8)));
        $this->assertTrue(isset($response['success']) && $response['success'], 'Cannot create user');
        $this->assertTrue(isset($response['user']['id']));
        $this->assertEquals($userEmail, $response['user']['email']);
        self::$_createdUserId = $response['user']['id'];
        $this->removeUser(self::$_createdUserId);
        self::$_createdUserId = null;
    }