'Usuario', 'perfiles' => 'Perfil', 'campos' => 'CampoPerfil', ); private $usuario_correcto = array( 'username' => 'pepe', 'password' => 'password', 'email' => 'darranz@rodax-software.com', 'nombre' => 'Pepe', 'apellidos' => 'Pérez', ); protected function setUp() { $this->getFixtureManager()->basePath = Yii::getPathOfAlias('application.tests.modules.usuario.fixtures'); parent::setUp(); $this->setBrowserUrl(TEST_BASE_URL); } public function testActivacionCorrecta() { $key = 'eaf2a42cadde86331f821bda9b85ead3'; $email = 'sin_activar@localhost.local'; $this->open('?r=' . Yii::app()->getModule('usuario')->urlActivar . '&key=' . $key . '&email=' . $email); $this->pause(4000); $this->verifyTextPresent("Gracias por registrarse en FactuGES. Su cuenta ha sido confirmada."); } public function testActivacionUsuarioYaActivado() { $key = 'eaf2a42cadde86331f821bda9b85ead3'; $email = 'activado@localhost.local'; $this->open('?r=' . Yii::app()->getModule('usuario')->urlActivar . '&key=' . $key . '&email=' . $email); $this->pause(4000); $this->verifyTextPresent("No se ha realizado ningún cambio. La cuenta ya estaba activada."); } public function testActivacionUsuarioBloqueado() { $key = 'eaf2a42cadde86331f821bda9b85ead3'; $email = 'bloqueado@localhost.local'; $this->open('?r=' . Yii::app()->getModule('usuario')->urlActivar . '&key=' . $key . '&email=' . $email); $this->pause(4000); $this->verifyTextPresent("La cuenta ha sido bloqueada. Contacte con el administrador del sitio para obtener más información."); } public function testActivacionUsuarioBorrado() { $key = 'eaf2a42cadde86331f821bda9b85ead3'; $email = 'borrado@localhost.local'; $this->open('?r=' . Yii::app()->getModule('usuario')->urlActivar . '&key=' . $key . '&email=' . $email); $this->pause(4000); $this->verifyTextPresent("Gracias por registrarse en FactuGES. Su cuenta ha sido confirmada."); } }