Fix tests for ldap and login mask

refs #4941
This commit is contained in:
Marius Hein 2013-10-22 16:24:49 +02:00
parent b9f03e27b7
commit b071160cdc
2 changed files with 18 additions and 10 deletions

View File

@ -3,6 +3,7 @@ namespace Tests\Icinga\Protocol\Ldap;
require_once '../../library/Icinga/Protocol/Ldap/Query.php';
require_once '../../library/Icinga/Protocol/Ldap/Connection.php';
require_once '../../library/Icinga/Protocol/Ldap/LdapUtils.php';
require_once('Zend/Config.php');
/**
*
* Test class for Query
@ -13,12 +14,16 @@ class QueryTest extends \PHPUnit_Framework_TestCase
{
private function emptySelect()
{
$connection = new \Icinga\Protocol\Ldap\Connection((object) array(
'hostname' => 'localhost',
'root_dn' => 'dc=example,dc=com',
'bind_dn' => 'cn=user,ou=users,dc=example,dc=com',
'bind_pw' => '***'
));
$config = new \Zend_Config(
array(
'hostname' => 'localhost',
'root_dn' => 'dc=example,dc=com',
'bind_dn' => 'cn=user,ou=users,dc=example,dc=com',
'bind_pw' => '***'
)
);
$connection = new \Icinga\Protocol\Ldap\Connection($config);
return $connection->select();
}

View File

@ -46,10 +46,13 @@ namespace Tests\Icinga\Regression
{
$request = $this->getRequest();
$request->setMethod("POST")->setPost(array(
"username" => "test",
"password" => "test"
));
$request->setMethod("POST")->setPost(
array(
"username" => "test",
"password" => "test",
"btn_submit" => "1"
)
);
$view = new \Zend_View();
$form = new LoginForm();