parent
b9f03e27b7
commit
b071160cdc
|
@ -3,6 +3,7 @@ namespace Tests\Icinga\Protocol\Ldap;
|
||||||
require_once '../../library/Icinga/Protocol/Ldap/Query.php';
|
require_once '../../library/Icinga/Protocol/Ldap/Query.php';
|
||||||
require_once '../../library/Icinga/Protocol/Ldap/Connection.php';
|
require_once '../../library/Icinga/Protocol/Ldap/Connection.php';
|
||||||
require_once '../../library/Icinga/Protocol/Ldap/LdapUtils.php';
|
require_once '../../library/Icinga/Protocol/Ldap/LdapUtils.php';
|
||||||
|
require_once('Zend/Config.php');
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Test class for Query
|
* Test class for Query
|
||||||
|
@ -13,12 +14,16 @@ class QueryTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private function emptySelect()
|
private function emptySelect()
|
||||||
{
|
{
|
||||||
$connection = new \Icinga\Protocol\Ldap\Connection((object) array(
|
$config = new \Zend_Config(
|
||||||
|
array(
|
||||||
'hostname' => 'localhost',
|
'hostname' => 'localhost',
|
||||||
'root_dn' => 'dc=example,dc=com',
|
'root_dn' => 'dc=example,dc=com',
|
||||||
'bind_dn' => 'cn=user,ou=users,dc=example,dc=com',
|
'bind_dn' => 'cn=user,ou=users,dc=example,dc=com',
|
||||||
'bind_pw' => '***'
|
'bind_pw' => '***'
|
||||||
));
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$connection = new \Icinga\Protocol\Ldap\Connection($config);
|
||||||
return $connection->select();
|
return $connection->select();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,13 @@ namespace Tests\Icinga\Regression
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
|
|
||||||
$request->setMethod("POST")->setPost(array(
|
$request->setMethod("POST")->setPost(
|
||||||
|
array(
|
||||||
"username" => "test",
|
"username" => "test",
|
||||||
"password" => "test"
|
"password" => "test",
|
||||||
));
|
"btn_submit" => "1"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$view = new \Zend_View();
|
$view = new \Zend_View();
|
||||||
$form = new LoginForm();
|
$form = new LoginForm();
|
||||||
|
|
Loading…
Reference in New Issue