1
0
Fork 0
MySQLDumper/tests/functional/application/views/helpers/PopUpMessageTest.php
2011-06-10 21:55:32 +00:00

28 Zeilen
837 B
PHP

<?php
/**
* @group MsdViewHelper
*/
class PopUpMessageTest extends ControllerTestCase
{
public function testcanAddPopUpMessage()
{
// force popUp by log in with wrong credentials
$this->getRequest()
->setMethod('POST')
->setParams(
array(
'user' => 'tester',
'pass' => 'wrongPassword',
'autologin' => 0
)
);
$this->dispatch('/index/login');
$this->assertNotRedirect();
// make sure we see the login error message
$this->assertQueryCount("//div[@id='login-message']", 1);
$msg = "Diese Kombination von Benutzername und Passwort ist unbekannt.";
$this->assertQueryContentContains('#login-message', $msg);
}
}