diff --git a/src/Attribute.php b/src/Attribute.php index 7b35e8d54..85c3fab36 100644 --- a/src/Attribute.php +++ b/src/Attribute.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Attribute @@ -351,7 +351,7 @@ public static function setDateTimeAttribute(array &$data, $attribName, $value, $ $convertedValues[] = $v; } } - } elseif (!is_null($value)) { + } elseif ($value !== null) { $value = self::_valueToLdapDateTime($value, $utc); if ($value !== null) { $convertedValues[] = $value; diff --git a/src/Collection.php b/src/Collection.php index b9d775205..8d8cc4376 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @uses Iterator * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Collection implements \Iterator, \Countable diff --git a/src/Collection/DefaultIterator.php b/src/Collection/DefaultIterator.php index 36570098d..1ef3c86a3 100644 --- a/src/Collection/DefaultIterator.php +++ b/src/Collection/DefaultIterator.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -33,7 +33,7 @@ * @uses \Zend\Ldap\Exception * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class DefaultIterator implements \Iterator, \Countable @@ -262,7 +262,7 @@ public function key() */ public function next() { - if (is_resource($this->_current)) { + if (is_resource($this->_current) && $this->_itemCount > 0) { $this->_current = @ldap_next_entry($this->_ldap->getResource(), $this->_current); if ($this->_current === false) { $msg = $this->_ldap->getLastError($code); @@ -273,6 +273,8 @@ public function next() throw new Ldap\Exception($this->_ldap, 'getting next entry (' . $msg . ')'); } } + } else { + $this->_current = false; } } diff --git a/src/Converter.php b/src/Converter.php index cb6a6179e..bf51eba24 100644 --- a/src/Converter.php +++ b/src/Converter.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Converter diff --git a/src/Dn.php b/src/Dn.php index 28f5cb5df..2cfdf6ad0 100644 --- a/src/Dn.php +++ b/src/Dn.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -32,7 +32,7 @@ * @uses \Zend\Ldap\Exception * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Dn implements \ArrayAccess diff --git a/src/Exception.php b/src/Exception.php index 39834f185..1c7906cc9 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @uses \Exception * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Exception extends \Exception diff --git a/src/Filter.php b/src/Filter.php index 4e48aafa8..9ac4d0601 100644 --- a/src/Filter.php +++ b/src/Filter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Filter extends Filter\StringFilter diff --git a/src/Filter/AbstractFilter.php b/src/Filter/AbstractFilter.php index 3953ff955..01cb6582a 100644 --- a/src/Filter/AbstractFilter.php +++ b/src/Filter/AbstractFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -35,7 +35,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class AbstractFilter diff --git a/src/Filter/AndFilter.php b/src/Filter/AndFilter.php index 8ba6ec45e..678176cca 100644 --- a/src/Filter/AndFilter.php +++ b/src/Filter/AndFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class AndFilter extends LogicalFilter diff --git a/src/Filter/Exception.php b/src/Filter/Exception.php index f669c32d1..945d9a9d1 100644 --- a/src/Filter/Exception.php +++ b/src/Filter/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Exception extends \Exception diff --git a/src/Filter/LogicalFilter.php b/src/Filter/LogicalFilter.php index 910c2c3e1..263825c86 100644 --- a/src/Filter/LogicalFilter.php +++ b/src/Filter/LogicalFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class LogicalFilter extends AbstractFilter diff --git a/src/Filter/MaskFilter.php b/src/Filter/MaskFilter.php index 1d5d4b2a5..7d723a426 100644 --- a/src/Filter/MaskFilter.php +++ b/src/Filter/MaskFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class MaskFilter extends StringFilter diff --git a/src/Filter/NotFilter.php b/src/Filter/NotFilter.php index 83b6daee9..e8cebc5a0 100644 --- a/src/Filter/NotFilter.php +++ b/src/Filter/NotFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class NotFilter extends AbstractFilter diff --git a/src/Filter/OrFilter.php b/src/Filter/OrFilter.php index 98c63c27f..376f9f5f9 100644 --- a/src/Filter/OrFilter.php +++ b/src/Filter/OrFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class OrFilter extends LogicalFilter diff --git a/src/Filter/StringFilter.php b/src/Filter/StringFilter.php index 6f3de19fd..054052a37 100644 --- a/src/Filter/StringFilter.php +++ b/src/Filter/StringFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Filter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class StringFilter extends AbstractFilter diff --git a/src/Ldap.php b/src/Ldap.php index a9b275199..3be6a5023 100644 --- a/src/Ldap.php +++ b/src/Ldap.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,11 +30,11 @@ * @uses \Zend\Ldap\Exception * @uses \Zend\Ldap\Filter\AbstractFilter * @uses \Zend\Ldap\Node - * @uses \Zend\Ldap\Node\RootDSE + * @uses \Zend\Ldap\Node\RootDse * @uses \Zend\Ldap\Node\Schema * @category Zend * @package Zend_Ldap - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Ldap @@ -79,7 +79,7 @@ class Ldap protected $_boundUser = false; /** - * Caches the RootDSE + * Caches the RootDse * * @var \Zend\Ldap\Node */ @@ -275,6 +275,7 @@ public function setOptions($options) 'useStartTls' => false, 'optReferrals' => false, 'tryUsernameSplit' => true, + 'networkTimeout' => null, ); foreach ($permittedOptions as $key => $val) { @@ -287,6 +288,7 @@ public function setOptions($options) switch ($key) { case 'port': case 'accountCanonicalForm': + case 'networkTimeout': $permittedOptions[$key] = (int)$val; break; case 'useSsl': @@ -463,6 +465,14 @@ protected function _getTryUsernameSplit() return $this->_options['tryUsernameSplit']; } + /** + * @return int The value for network timeout when connect to the LDAP server. + */ + protected function _getNetworkTimeout() + { + return $this->_options['networkTimeout']; + } + /** * @return string The LDAP search filter for matching directory accounts */ @@ -657,14 +667,15 @@ public function disconnect() * if you really care about the server's cert you can put a cert on the * web server. * - * @param string $host The hostname of the LDAP server to connect to - * @param int $port The port number of the LDAP server to connect to - * @param boolean $useSsl Use SSL - * @param boolean $useStartTls Use STARTTLS + * @param string $host The hostname of the LDAP server to connect to + * @param int $port The port number of the LDAP server to connect to + * @param boolean $useSsl Use SSL + * @param boolean $useStartTls Use STARTTLS + * @param int $networkTimeout The value for network timeout when connect to the LDAP server. * @return \Zend\Ldap\Ldap Provides a fluent interface * @throws \Zend\Ldap\Exception */ - public function connect($host = null, $port = null, $useSsl = null, $useStartTls = null) + public function connect($host = null, $port = null, $useSsl = null, $useStartTls = null, $networkTimeout = null) { if ($host === null) { $host = $this->_getHost(); @@ -684,6 +695,11 @@ public function connect($host = null, $port = null, $useSsl = null, $useStartTls } else { $useStartTls = (bool)$useStartTls; } + if ($networkTimeout === null) { + $networkTimeout = $this->_getNetworkTimeout(); + } else { + $networkTimeout = (int)$networkTimeout; + } if (!$host) { throw new Exception(null, 'A host parameter is required'); @@ -713,6 +729,7 @@ public function connect($host = null, $port = null, $useSsl = null, $useStartTls $this->disconnect(); + /* Only OpenLDAP 2.2 + supports URLs so if SSL is not requested, just * use the old form. */ @@ -725,6 +742,9 @@ public function connect($host = null, $port = null, $useSsl = null, $useStartTls $optReferrals = ($this->_getOptReferrals()) ? 1 : 0; if (@ldap_set_option($resource, LDAP_OPT_PROTOCOL_VERSION, 3) && @ldap_set_option($resource, LDAP_OPT_REFERRALS, $optReferrals)) { + if ($networkTimeout) { + @ldap_set_option($resource, LDAP_OPT_NETWORK_TIMEOUT, $networkTimeout); + } if ($useSsl || !$useStartTls || @ldap_start_tls($resource)) { return $this; } @@ -1416,15 +1436,15 @@ public function getBaseNode() } /** - * Returns the RootDSE + * Returns the RootDse * - * @return \Zend\Ldap\Node\RootDSE + * @return \Zend\Ldap\Node\RootDse * @throws \Zend\Ldap\Exception */ public function getRootDse() { if ($this->_rootDse === null) { - $this->_rootDse = Node\RootDSE::create($this); + $this->_rootDse = Node\RootDse::create($this); } return $this->_rootDse; } diff --git a/src/Ldif/Encoder.php b/src/Ldif/Encoder.php index c6ff756cd..fb13e7aec 100644 --- a/src/Ldif/Encoder.php +++ b/src/Ldif/Encoder.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Ldif - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Ldif - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Encoder diff --git a/src/Node.php b/src/Node.php index 648d95707..f09c995d8 100644 --- a/src/Node.php +++ b/src/Node.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Node - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Node - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator diff --git a/src/Node/AbstractNode.php b/src/Node/AbstractNode.php index 0757b1287..2e3133476 100644 --- a/src/Node/AbstractNode.php +++ b/src/Node/AbstractNode.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Node - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Node - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class AbstractNode implements \ArrayAccess, \Countable diff --git a/src/Node/ChildrenIterator.php b/src/Node/ChildrenIterator.php index 0813d1ce5..6aa79cc59 100644 --- a/src/Node/ChildrenIterator.php +++ b/src/Node/ChildrenIterator.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Node - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -37,7 +37,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Node - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class ChildrenIterator implements \Iterator, \Countable, \RecursiveIterator, \ArrayAccess diff --git a/src/Node/Collection.php b/src/Node/Collection.php index 743c77223..a291f8db8 100644 --- a/src/Node/Collection.php +++ b/src/Node/Collection.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Node - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Node - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Collection extends \Zend\Ldap\Collection diff --git a/src/Node/RootDse.php b/src/Node/RootDse.php index 5ae200d44..74941da04 100644 --- a/src/Node/RootDse.php +++ b/src/Node/RootDse.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage RootDse - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ use Zend\Ldap; /** - * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDSE node. + * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDse node. * * @uses \Zend\Ldap\Dn * @uses \Zend\Ldap\Node\AbstractNode @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Ldap * @subpackage RootDse - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class RootDse extends AbstractNode @@ -47,7 +47,7 @@ class RootDse extends AbstractNode const SERVER_TYPE_EDIRECTORY = 4; /** - * Factory method to create the RootDSE. + * Factory method to create the RootDse. * * @param \Zend\Ldap\Ldap $ldap * @return \Zend\Ldap\Node\RootDse diff --git a/src/Node/RootDse/ActiveDirectory.php b/src/Node/RootDse/ActiveDirectory.php index b2ca2863e..ef9ab9ef5 100644 --- a/src/Node/RootDse/ActiveDirectory.php +++ b/src/Node/RootDse/ActiveDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage RootDse - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ use Zend\Ldap\Node\RootDse; /** - * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDSE node of + * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDse node of * an Active Directory server. * * @uses \Zend\Ldap\Dn @@ -35,7 +35,7 @@ * @category Zend * @package Zend_Ldap * @subpackage RootDse - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class ActiveDirectory extends RootDse diff --git a/src/Node/RootDse/OpenLdap.php b/src/Node/RootDse/OpenLdap.php index b955d106d..bf39f022a 100644 --- a/src/Node/RootDse/OpenLdap.php +++ b/src/Node/RootDse/OpenLdap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage RootDse - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,14 +27,14 @@ use Zend\Ldap\Node\RootDse; /** - * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDSE node of + * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDse node of * an OpenLDAP server. * * @uses \Zend\Ldap\Node\RootDse * @category Zend * @package Zend_Ldap * @subpackage RootDse - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class OpenLdap extends RootDse diff --git a/src/Node/RootDse/eDirectory.php b/src/Node/RootDse/eDirectory.php index e38a55755..5a30ece56 100644 --- a/src/Node/RootDse/eDirectory.php +++ b/src/Node/RootDse/eDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage RootDse - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,14 +27,14 @@ use Zend\Ldap\Node\RootDse; /** - * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDSE node of + * Zend_Ldap_Node_RootDse provides a simple data-container for the RootDse node of * a Novell eDirectory server. * * @uses \Zend\Ldap\Node\RootDse * @category Zend * @package Zend_Ldap * @subpackage RootDse - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class eDirectory extends RootDse diff --git a/src/Node/Schema.php b/src/Node/Schema.php index 47fe2c558..0b10d5a18 100644 --- a/src/Node/Schema.php +++ b/src/Node/Schema.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,19 +25,19 @@ namespace Zend\Ldap\Node; use Zend\Ldap; -use Zend\Ldap\Node\RootDSE; +use Zend\Ldap\Node\RootDse; /** * Zend_Ldap_Node_Schema provides a simple data-container for the Schema node. * * @uses \Zend\Ldap\Node\AbstractNode - * @uses \Zend\Ldap\Node\RootDSE\RootDSE - * @uses \Zend\Ldap\Node\RootDSE\ActiveDirectory + * @uses \Zend\Ldap\Node\RootDse\RootDse + * @uses \Zend\Ldap\Node\RootDse\ActiveDirectory * @uses \Zend\Ldap\Node\Schema\ActiveDirectory * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Schema extends AbstractNode @@ -59,11 +59,11 @@ public static function create(Ldap\Ldap $ldap) $dn = $ldap->getRootDse()->getSchemaDn(); $data = $ldap->getEntry($dn, array('*', '+'), true); switch ($ldap->getRootDse()->getServerType()) { - case RootDSE::SERVER_TYPE_ACTIVEDIRECTORY: + case RootDse::SERVER_TYPE_ACTIVEDIRECTORY: return new Schema\ActiveDirectory($dn, $data, $ldap); - case RootDSE::SERVER_TYPE_OPENLDAP: + case RootDse::SERVER_TYPE_OPENLDAP: return new Schema\OpenLdap($dn, $data, $ldap); - case RootDSE::SERVER_TYPE_EDIRECTORY: + case RootDse::SERVER_TYPE_EDIRECTORY: default: return new self($dn, $data, $ldap); } diff --git a/src/Node/Schema/ActiveDirectory.php b/src/Node/Schema/ActiveDirectory.php index 540150fbd..9142ec974 100644 --- a/src/Node/Schema/ActiveDirectory.php +++ b/src/Node/Schema/ActiveDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class ActiveDirectory extends Schema diff --git a/src/Node/Schema/AttributeType.php b/src/Node/Schema/AttributeType.php index 61d99b58a..fabbbb452 100644 --- a/src/Node/Schema/AttributeType.php +++ b/src/Node/Schema/AttributeType.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface AttributeType diff --git a/src/Node/Schema/AttributeType/ActiveDirectory.php b/src/Node/Schema/AttributeType/ActiveDirectory.php index 67e0380eb..0dd8cee55 100644 --- a/src/Node/Schema/AttributeType/ActiveDirectory.php +++ b/src/Node/Schema/AttributeType/ActiveDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class ActiveDirectory extends Schema\Item implements AttributeType diff --git a/src/Node/Schema/AttributeType/OpenLdap.php b/src/Node/Schema/AttributeType/OpenLdap.php index 194726d1b..b132c41ac 100644 --- a/src/Node/Schema/AttributeType/OpenLdap.php +++ b/src/Node/Schema/AttributeType/OpenLdap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class OpenLdap extends Schema\Item implements AttributeType diff --git a/src/Node/Schema/Item.php b/src/Node/Schema/Item.php index 35fbd7f5d..5d2fb9e74 100644 --- a/src/Node/Schema/Item.php +++ b/src/Node/Schema/Item.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Item implements \ArrayAccess, \Countable diff --git a/src/Node/Schema/ObjectClass.php b/src/Node/Schema/ObjectClass.php index 027765dd6..3439f0aca 100644 --- a/src/Node/Schema/ObjectClass.php +++ b/src/Node/Schema/ObjectClass.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface ObjectClass diff --git a/src/Node/Schema/ObjectClass/ActiveDirectory.php b/src/Node/Schema/ObjectClass/ActiveDirectory.php index ad7dba4e7..7222543e6 100644 --- a/src/Node/Schema/ObjectClass/ActiveDirectory.php +++ b/src/Node/Schema/ObjectClass/ActiveDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class ActiveDirectory extends Schema\Item implements ObjectClass diff --git a/src/Node/Schema/ObjectClass/OpenLdap.php b/src/Node/Schema/ObjectClass/OpenLdap.php index 9fae50b10..761731c4a 100644 --- a/src/Node/Schema/ObjectClass/OpenLdap.php +++ b/src/Node/Schema/ObjectClass/OpenLdap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -37,7 +37,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class OpenLdap extends Schema\Item implements ObjectClass diff --git a/src/Node/Schema/OpenLdap.php b/src/Node/Schema/OpenLdap.php index ccf7b45a4..09f8f9a26 100644 --- a/src/Node/Schema/OpenLdap.php +++ b/src/Node/Schema/OpenLdap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Ldap * @subpackage Schema - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class OpenLdap extends Schema diff --git a/test/AttributeTest.php b/test/AttributeTest.php index 5596089dd..a3f6f4fed 100644 --- a/test/AttributeTest.php +++ b/test/AttributeTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,11 +27,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class AttributeTest extends \PHPUnit_Framework_TestCase { diff --git a/test/BindTest.php b/test/BindTest.php index 575985fb2..c13ae38ce 100644 --- a/test/BindTest.php +++ b/test/BindTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -33,11 +33,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class BindTest extends \PHPUnit_Framework_TestCase { @@ -49,7 +49,7 @@ class BindTest extends \PHPUnit_Framework_TestCase public function setUp() { if (!constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) { - $this->markTestSkipped("Zend_LDAP online tests are not enabled"); + $this->markTestSkipped("Zend_Ldap online tests are not enabled"); } $this->_options = array( diff --git a/test/CanonTest.php b/test/CanonTest.php index ebf09ba63..bd776dc24 100644 --- a/test/CanonTest.php +++ b/test/CanonTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -33,11 +33,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class CanonTest extends \PHPUnit_Framework_TestCase { @@ -46,7 +46,7 @@ class CanonTest extends \PHPUnit_Framework_TestCase public function setUp() { if (!constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) { - $this->markTestSkipped("Zend_LDAP online tests are not enabled"); + $this->markTestSkipped("Zend_Ldap online tests are not enabled"); } $this->_options = array( diff --git a/test/ChangePasswordTest.php b/test/ChangePasswordTest.php index b238cee0b..ad0597b72 100644 --- a/test/ChangePasswordTest.php +++ b/test/ChangePasswordTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,10 +28,10 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @group Zend_LDAP - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @group Zend_Ldap + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -56,7 +56,7 @@ public function testAddNewUserWithPasswordOpenLDAP() try { $this->_getLDAP()->add($dn, $data); - $this->assertType('Zend\Ldap\Ldap', $this->_getLDAP()->bind($dn, $password)); + $this->assertInstanceOf('Zend\Ldap\Ldap', $this->_getLDAP()->bind($dn, $password)); $this->_getLDAP()->bind(); $this->_getLDAP()->delete($dn); @@ -105,7 +105,7 @@ public function testChangePasswordWithUserAccountOpenLDAP() strstr($message, 'Server is unwilling to perform')); } - $this->assertType('Zend\Ldap\Ldap', $this->_getLDAP()->bind($dn, $newPasswd)); + $this->assertInstanceOf('Zend\Ldap\Ldap', $this->_getLDAP()->bind($dn, $newPasswd)); $this->_getLDAP()->bind(); $this->_getLDAP()->delete($dn); @@ -145,7 +145,7 @@ public function testAddNewUserWithPasswordActiveDirectory() try { $this->_getLDAP()->add($dn, $data); - $this->assertType('Zend_LDAP', $this->_getLDAP()->bind($dn, $password)); + $this->assertInstanceOf('Zend\Ldap', $this->_getLDAP()->bind($dn, $password)); $this->_getLDAP()->bind(); $this->_getLDAP()->delete($dn); @@ -201,7 +201,7 @@ public function testChangePasswordWithUserAccountActiveDirectory() strstr($message, 'Server is unwilling to perform')); } - $this->assertType('Zend_LDAP', $this->_getLDAP()->bind($dn, $newPasswd)); + $this->assertInstanceOf('Zend\Ldap', $this->_getLDAP()->bind($dn, $newPasswd)); $this->_getLDAP()->bind(); $this->_getLDAP()->delete($dn); diff --git a/test/ConnectTest.php b/test/ConnectTest.php index f26b5597a..745e734b2 100644 --- a/test/ConnectTest.php +++ b/test/ConnectTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -33,11 +33,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class ConnectTest extends \PHPUnit_Framework_TestCase { @@ -46,7 +46,7 @@ class ConnectTest extends \PHPUnit_Framework_TestCase public function setUp() { if (!constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) { - $this->markTestSkipped("Zend_LDAP online tests are not enabled"); + $this->markTestSkipped("Zend_Ldap online tests are not enabled"); } $this->_options = array('host' => TESTS_ZEND_LDAP_HOST); @@ -90,6 +90,16 @@ public function testPlainConnect() $this->assertContains('Invalid credentials', $zle->getMessage()); } } + public function testNetworkTimeoutConnect() + { + $networkTimeout = 1; + $ldap = new Ldap\Ldap(array_merge($this->_options, array('networkTimeout' => $networkTimeout))); + + $ldap->connect(); + ldap_get_option($ldap->getResource(), LDAP_OPT_NETWORK_TIMEOUT, $actual); + $this->assertEquals($networkTimeout, $actual); + } + public function testExplicitParamsConnect() { $host = TESTS_ZEND_LDAP_HOST; @@ -126,6 +136,22 @@ public function testExplicitPortConnect() $this->assertContains('Invalid credentials', $zle->getMessage()); } } + public function testExplicitNetworkTimeoutConnect() + { + $networkTimeout = 1; + $host = TESTS_ZEND_LDAP_HOST; + $port = 0; + if (defined('TESTS_ZEND_LDAP_PORT') && TESTS_ZEND_LDAP_PORT != 389) + $port = TESTS_ZEND_LDAP_PORT; + $useSsl = false; + if (defined('TESTS_ZEND_LDAP_USE_SSL')) + $useSsl = TESTS_ZEND_LDAP_USE_SSL; + + $ldap = new Ldap\Ldap(); + $ldap->connect($host, $port, $useSsl, null, $networkTimeout); + ldap_get_option($ldap->getResource(), LDAP_OPT_NETWORK_TIMEOUT, $actual); + $this->assertEquals($networkTimeout, $actual); + } public function testBadPortConnect() { $options = $this->_options; diff --git a/test/ConverterTest.php b/test/ConverterTest.php index e467053d4..35ce610f1 100644 --- a/test/ConverterTest.php +++ b/test/ConverterTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,11 +28,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class ConverterTest extends \PHPUnit_Framework_TestCase { diff --git a/test/CopyRenameTest.php b/test/CopyRenameTest.php index f4e8783dd..682ff8ebe 100644 --- a/test/CopyRenameTest.php +++ b/test/CopyRenameTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,11 +28,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class CopyRenameTest extends OnlineTestCase { diff --git a/test/CrudTest.php b/test/CrudTest.php index 87f111075..6227d11f7 100644 --- a/test/CrudTest.php +++ b/test/CrudTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,11 +27,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class CrudTest extends OnlineTestCase { diff --git a/test/Dn/CreationTest.php b/test/Dn/CreationTest.php index b79d866df..9f5b54437 100644 --- a/test/Dn/CreationTest.php +++ b/test/Dn/CreationTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,17 +29,17 @@ * Test helper */ /** - * Zend_LDAP_Dn + * Zend_Ldap_Dn */ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Dn + * @group Zend_Ldap + * @group Zend_Ldap_Dn */ class CreationTest extends \PHPUnit_Framework_TestCase { @@ -119,7 +119,7 @@ public function testDnCreation() try { $dn=Ldap\Dn::factory(1); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Invalid argument type for $dn', $e->getMessage()); } @@ -195,13 +195,13 @@ public function testGetParentDn() try { $dn->getParentDn(0)->toString(); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Cannot retrieve parent DN with given $levelUp', $e->getMessage()); } try { $dn->getParentDn(4)->toString(); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Cannot retrieve parent DN with given $levelUp', $e->getMessage()); } diff --git a/test/Dn/EscapingTest.php b/test/Dn/EscapingTest.php index 0d480c05a..cfe92a071 100644 --- a/test/Dn/EscapingTest.php +++ b/test/Dn/EscapingTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,17 +29,17 @@ * Test helper */ /** - * Zend_LDAP_Dn + * Zend_Ldap_Dn */ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Dn + * @group Zend_Ldap + * @group Zend_Ldap_Dn */ class EscapingTest extends \PHPUnit_Framework_TestCase { diff --git a/test/Dn/ExplodingTest.php b/test/Dn/ExplodingTest.php index 31f94d2c5..6dd92d04d 100644 --- a/test/Dn/ExplodingTest.php +++ b/test/Dn/ExplodingTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,12 +28,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Dn + * @group Zend_Ldap + * @group Zend_Ldap_Dn */ class ExplodingTest extends \PHPUnit_Framework_TestCase { diff --git a/test/Dn/ImplodingTest.php b/test/Dn/ImplodingTest.php index 11ff190ed..b8edd7ef4 100644 --- a/test/Dn/ImplodingTest.php +++ b/test/Dn/ImplodingTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,12 +27,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Dn + * @group Zend_Ldap + * @group Zend_Ldap_Dn */ class ImplodingTest extends \PHPUnit_Framework_TestCase { diff --git a/test/Dn/MiscTest.php b/test/Dn/MiscTest.php index dfc44baea..e48164d9c 100644 --- a/test/Dn/MiscTest.php +++ b/test/Dn/MiscTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,17 +29,17 @@ * Test helper */ /** - * Zend_LDAP_Dn + * Zend_Ldap_Dn */ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Dn + * @group Zend_Ldap + * @group Zend_Ldap_Dn */ class MiscTest extends \PHPUnit_Framework_TestCase { diff --git a/test/Dn/ModificationTest.php b/test/Dn/ModificationTest.php index 0cc8988f6..90cf730a5 100644 --- a/test/Dn/ModificationTest.php +++ b/test/Dn/ModificationTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,17 +29,17 @@ * Test helper */ /** - * Zend_LDAP_Dn + * Zend_Ldap_Dn */ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Dn + * @group Zend_Ldap + * @group Zend_Ldap_Dn */ class ModificationTest extends \PHPUnit_Framework_TestCase { @@ -54,19 +54,19 @@ public function testDnManipulationGet() $this->assertEquals(array('dc' => 'com'), $dn->get(3)); try { $this->assertEquals(array('dc' => 'com'), $dn->get('string')); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Parameter $index must be an integer', $e->getMessage()); } try { $this->assertEquals(array('cn' => 'Baker, Alice'), $dn->get(-1)); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Parameter $index out of bounds', $e->getMessage()); } try { $this->assertEquals(array('dc' => 'com'), $dn->get(4)); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Parameter $index out of bounds', $e->getMessage()); } @@ -138,13 +138,13 @@ public function testDnManipulationSet() try { $dn->set(4, array('dc' => 'de')); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Parameter $index out of bounds', $e->getMessage()); } try { $dn->set(3, array('dc' => 'de', 'ou')); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('RDN Array is malformed: it must use string keys', $e->getMessage()); } @@ -170,7 +170,7 @@ public function testDnManipulationRemove() try { $dn=Ldap\Dn::fromString($dnString); $dn->remove(4); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Parameter $index out of bounds', $e->getMessage()); } @@ -201,13 +201,13 @@ public function testDnManipulationAppendAndPrepend() try { $dn->append(array('dc' => 'de', 'ou')); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('RDN Array is malformed: it must use string keys', $e->getMessage()); } try { $dn->prepend(array('dc' => 'de', 'ou')); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('RDN Array is malformed: it must use string keys', $e->getMessage()); } @@ -236,14 +236,14 @@ public function testDnManipulationInsert() try { $dn=Ldap\Dn::fromString($dnString); $dn->insert(4, array('dc' => 'de')); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('Parameter $index out of bounds', $e->getMessage()); } try { $dn=Ldap\Dn::fromString($dnString); $dn->insert(3, array('dc' => 'de', 'ou')); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { $this->assertEquals('RDN Array is malformed: it must use string keys', $e->getMessage()); } diff --git a/test/FilterTest.php b/test/FilterTest.php index 70d925b00..fc485a3e3 100644 --- a/test/FilterTest.php +++ b/test/FilterTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,11 +27,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class FilterTest extends \PHPUnit_Framework_TestCase { diff --git a/test/Ldif/SimpleDecoderTest.php b/test/Ldif/SimpleDecoderTest.php index 9eecab304..87f63d68a 100644 --- a/test/Ldif/SimpleDecoderTest.php +++ b/test/Ldif/SimpleDecoderTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,12 +28,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Ldif + * @group Zend_Ldap + * @group Zend_Ldap_Ldif */ class SimpleDecoderTest extends \ZendTest\Ldap\TestCase { diff --git a/test/Ldif/SimpleEncoderTest.php b/test/Ldif/SimpleEncoderTest.php index 5a3f38673..e065d37d6 100644 --- a/test/Ldif/SimpleEncoderTest.php +++ b/test/Ldif/SimpleEncoderTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,12 +28,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Ldif + * @group Zend_Ldap + * @group Zend_Ldap_Ldif */ class SimpleEncoderTest extends \ZendTest\Ldap\TestCase { diff --git a/test/Node/AttributeIterationTest.php b/test/Node/AttributeIterationTest.php index 256c979ae..85a75d649 100644 --- a/test/Node/AttributeIterationTest.php +++ b/test/Node/AttributeIterationTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,12 +27,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Node + * @group Zend_Ldap + * @group Zend_Ldap_Node */ class AttributeIterationTest extends \ZendTest\Ldap\TestCase { diff --git a/test/Node/ChildrenIterationTest.php b/test/Node/ChildrenIterationTest.php index 1ebc9f041..a6347edf9 100644 --- a/test/Node/ChildrenIterationTest.php +++ b/test/Node/ChildrenIterationTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,20 +26,20 @@ use Zend\Ldap; /** - * Zend_LDAP_OnlineTestCase + * Zend_Ldap_OnlineTestCase */ /** - * @see Zend_LDAP_Node + * @see Zend_Ldap_Node */ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Node + * @group Zend_Ldap + * @group Zend_Ldap_Node */ class ChildrenIterationTest extends \ZendTest\Ldap\OnlineTestCase { @@ -113,7 +113,7 @@ public function testSimpleRecursiveIteration() /** * Test issue reported by Lance Hendrix on - * http://framework.zend.com/wiki/display/ZFPROP/Zend_LDAP+-+Extended+support+-+Stefan+Gehrig? + * http://framework.zend.com/wiki/display/ZFPROP/Zend_Ldap+-+Extended+support+-+Stefan+Gehrig? * focusedCommentId=13107431#comment-13107431 */ public function testCallingNextAfterIterationShouldNotThrowException() diff --git a/test/Node/ChildrenTest.php b/test/Node/ChildrenTest.php index af4833cc6..0e2306b64 100644 --- a/test/Node/ChildrenTest.php +++ b/test/Node/ChildrenTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,12 +27,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Node + * @group Zend_Ldap + * @group Zend_Ldap_Node */ class ChildrenTest extends \ZendTest\Ldap\OnlineTestCase { @@ -52,9 +52,9 @@ public function testGetChildrenOnAttachedNode() { $node=$this->_getLDAP()->getBaseNode(); $children=$node->getChildren(); - $this->assertType('Zend\Ldap\Node\ChildrenIterator', $children); + $this->assertInstanceOf('Zend\Ldap\Node\ChildrenIterator', $children); $this->assertEquals(6, count($children)); - $this->assertType('Zend\Ldap\Node', $children['ou=Node']); + $this->assertInstanceOf('Zend\Ldap\Node', $children['ou=Node']); } public function testGetChildrenOnDetachedNode() @@ -62,16 +62,16 @@ public function testGetChildrenOnDetachedNode() $node=$this->_getLDAP()->getBaseNode(); $node->detachLDAP(); $children=$node->getChildren(); - $this->assertType('Zend\Ldap\Node\ChildrenIterator', $children); + $this->assertInstanceOf('Zend\Ldap\Node\ChildrenIterator', $children); $this->assertEquals(0, count($children)); $node->attachLDAP($this->_getLDAP()); $node->reload(); $children=$node->getChildren(); - $this->assertType('Zend\Ldap\Node\ChildrenIterator', $children); + $this->assertInstanceOf('Zend\Ldap\Node\ChildrenIterator', $children); $this->assertEquals(6, count($children)); - $this->assertType('Zend\Ldap\Node', $children['ou=Node']); + $this->assertInstanceOf('Zend\Ldap\Node', $children['ou=Node']); } public function testHasChildrenOnAttachedNode() diff --git a/test/Node/OfflineTest.php b/test/Node/OfflineTest.php index 2f01b1099..6cf3891ec 100644 --- a/test/Node/OfflineTest.php +++ b/test/Node/OfflineTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,12 +28,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Node + * @group Zend_Ldap + * @group Zend_Ldap_Node */ class OfflineTest extends \ZendTest\Ldap\TestCase { diff --git a/test/Node/OnlineTest.php b/test/Node/OnlineTest.php index db2d67009..8e9f99879 100644 --- a/test/Node/OnlineTest.php +++ b/test/Node/OnlineTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,12 +28,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Node + * @group Zend_Ldap + * @group Zend_Ldap_Node */ class OnlineTest extends \ZendTest\Ldap\OnlineTestCase { @@ -53,7 +53,7 @@ public function testLoadFromLDAP() { $dn=$this->_createDn('ou=Test1,'); $node=Node::fromLDAP($dn, $this->_getLDAP()); - $this->assertType('Zend\Ldap\Node', $node); + $this->assertInstanceOf('Zend\Ldap\Node', $node); $this->assertTrue($node->isAttached()); } @@ -107,7 +107,7 @@ public function testDetachAndReattach() { $dn=$this->_createDn('ou=Test1,'); $node=Node::fromLDAP($dn, $this->_getLDAP()); - $this->assertType('Zend\Ldap\Node', $node); + $this->assertInstanceOf('Zend\Ldap\Node', $node); $this->assertTrue($node->isAttached()); $node->detachLDAP(); $this->assertFalse($node->isAttached()); @@ -213,7 +213,7 @@ public function testSearchSubtree() $node=$this->_getLDAP()->getNode($this->_createDn('ou=Node,')); $items=$node->searchSubtree('(objectClass=organizationalUnit)', Ldap\Ldap::SEARCH_SCOPE_SUB, array(), 'ou'); - $this->assertType('Zend\Ldap\Node\Collection', $items); + $this->assertInstanceOf('Zend\Ldap\Node\Collection', $items); $this->assertEquals(3, $items->count()); $i=0; @@ -280,7 +280,7 @@ public function testLoadFromLDAPWithDnObject() { $dn=Ldap\Dn::fromString($this->_createDn('ou=Test1,')); $node=Node::fromLDAP($dn, $this->_getLDAP()); - $this->assertType('Zend\Ldap\Node', $node); + $this->assertInstanceOf('Zend\Ldap\Node', $node); $this->assertTrue($node->isAttached()); } } diff --git a/test/Node/RootDseTest.php b/test/Node/RootDseTest.php index 17b2216d3..5068f1a5d 100644 --- a/test/Node/RootDseTest.php +++ b/test/Node/RootDseTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,17 +26,17 @@ use Zend\Ldap\Node\RootDse; /** - * Zend_LDAP_OnlineTestCase + * Zend_Ldap_OnlineTestCase */ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Node + * @group Zend_Ldap + * @group Zend_Ldap_Node */ class RootDseTest extends \ZendTest\Ldap\OnlineTestCase { @@ -53,38 +53,38 @@ public function testSupportCheckMethods() { $root=$this->_getLDAP()->getRootDse(); - $this->assertType('boolean', $root->supportsSaslMechanism('GSSAPI')); - $this->assertType('boolean', $root->supportsSaslMechanism(array('GSSAPI', 'DIGEST-MD5'))); - $this->assertType('boolean', $root->supportsVersion('3')); - $this->assertType('boolean', $root->supportsVersion(3)); - $this->assertType('boolean', $root->supportsVersion(array('3', '2'))); - $this->assertType('boolean', $root->supportsVersion(array(3, 2))); + $this->assertInternalType('boolean', $root->supportsSaslMechanism('GSSAPI')); + $this->assertInternalType('boolean', $root->supportsSaslMechanism(array('GSSAPI', 'DIGEST-MD5'))); + $this->assertInternalType('boolean', $root->supportsVersion('3')); + $this->assertInternalType('boolean', $root->supportsVersion(3)); + $this->assertInternalType('boolean', $root->supportsVersion(array('3', '2'))); + $this->assertInternalType('boolean', $root->supportsVersion(array(3, 2))); switch ($root->getServerType()) { case RootDse::SERVER_TYPE_ACTIVEDIRECTORY: - $this->assertType('boolean', $root->supportsControl('1.2.840.113556.1.4.319')); - $this->assertType('boolean', $root->supportsControl(array('1.2.840.113556.1.4.319', + $this->assertInternalType('boolean', $root->supportsControl('1.2.840.113556.1.4.319')); + $this->assertInternalType('boolean', $root->supportsControl(array('1.2.840.113556.1.4.319', '1.2.840.113556.1.4.473'))); - $this->assertType('boolean', $root->supportsCapability('1.3.6.1.4.1.4203.1.9.1.1')); - $this->assertType('boolean', $root->supportsCapability(array('1.3.6.1.4.1.4203.1.9.1.1', + $this->assertInternalType('boolean', $root->supportsCapability('1.3.6.1.4.1.4203.1.9.1.1')); + $this->assertInternalType('boolean', $root->supportsCapability(array('1.3.6.1.4.1.4203.1.9.1.1', '2.16.840.1.113730.3.4.18'))); - $this->assertType('boolean', $root->supportsPolicy('unknown')); - $this->assertType('boolean', $root->supportsPolicy(array('unknown', 'unknown'))); + $this->assertInternalType('boolean', $root->supportsPolicy('unknown')); + $this->assertInternalType('boolean', $root->supportsPolicy(array('unknown', 'unknown'))); break; case RootDse::SERVER_TYPE_EDIRECTORY: - $this->assertType('boolean', $root->supportsExtension('1.3.6.1.4.1.1466.20037')); - $this->assertType('boolean', $root->supportsExtension(array('1.3.6.1.4.1.1466.20037', + $this->assertInternalType('boolean', $root->supportsExtension('1.3.6.1.4.1.1466.20037')); + $this->assertInternalType('boolean', $root->supportsExtension(array('1.3.6.1.4.1.1466.20037', '1.3.6.1.4.1.4203.1.11.1'))); break; case RootDse::SERVER_TYPE_OPENLDAP: - $this->assertType('boolean', $root->supportsControl('1.3.6.1.4.1.4203.1.9.1.1')); - $this->assertType('boolean', $root->supportsControl(array('1.3.6.1.4.1.4203.1.9.1.1', + $this->assertInternalType('boolean', $root->supportsControl('1.3.6.1.4.1.4203.1.9.1.1')); + $this->assertInternalType('boolean', $root->supportsControl(array('1.3.6.1.4.1.4203.1.9.1.1', '2.16.840.1.113730.3.4.18'))); - $this->assertType('boolean', $root->supportsExtension('1.3.6.1.4.1.1466.20037')); - $this->assertType('boolean', $root->supportsExtension(array('1.3.6.1.4.1.1466.20037', + $this->assertInternalType('boolean', $root->supportsExtension('1.3.6.1.4.1.1466.20037')); + $this->assertInternalType('boolean', $root->supportsExtension(array('1.3.6.1.4.1.1466.20037', '1.3.6.1.4.1.4203.1.11.1'))); - $this->assertType('boolean', $root->supportsFeature('1.3.6.1.1.14')); - $this->assertType('boolean', $root->supportsFeature(array('1.3.6.1.1.14', + $this->assertInternalType('boolean', $root->supportsFeature('1.3.6.1.1.14')); + $this->assertInternalType('boolean', $root->supportsFeature(array('1.3.6.1.1.14', '1.3.6.1.4.1.4203.1.5.1'))); break; } @@ -108,8 +108,8 @@ public function testGetters() $this->assertInternalType('string', $root->getDsServiceName()); $this->assertInternalType('string', $root->getForestFunctionality()); $this->assertInternalType('string', $root->getHighestCommittedUSN()); - $this->assertType('boolean', $root->getIsGlobalCatalogReady()); - $this->assertType('boolean', $root->getIsSynchronized()); + $this->assertInternalType('boolean', $root->getIsGlobalCatalogReady()); + $this->assertInternalType('boolean', $root->getIsSynchronized()); $this->assertInternalType('string', $root->getLDAPServiceName()); $this->assertInternalType('string', $root->getRootDomainNamingContext()); $this->assertInternalType('string', $root->getSchemaNamingContext()); diff --git a/test/Node/SchemaTest.php b/test/Node/SchemaTest.php index 95b2805c5..f0adad88a 100644 --- a/test/Node/SchemaTest.php +++ b/test/Node/SchemaTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,22 +26,22 @@ use Zend\Ldap\Node\RootDse; /** - * Zend_LDAP_OnlineTestCase + * Zend_Ldap_OnlineTestCase */ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Node + * @group Zend_Ldap + * @group Zend_Ldap_Node */ class SchemaTest extends \ZendTest\Ldap\OnlineTestCase { /** - * @var Zend_LDAP_Node_Schema + * @var Zend_Ldap_Node_Schema */ private $_schema; @@ -126,7 +126,7 @@ public function testOpenLDAPSchema() $this->assertArrayHasKey('organizationalUnit', $objectClasses); $ou=$objectClasses['organizationalUnit']; - $this->assertType('\Zend\Ldap\Node\Schema\ObjectClassOpenLdap', $ou); + $this->assertInstanceOf('Zend\Ldap\Node\Schema\ObjectClass\OpenLdap', $ou); $this->assertEquals('organizationalUnit', $ou->getName()); $this->assertEquals('2.5.6.5', $ou->getOid()); $this->assertEquals(array('objectClass', 'ou'), $ou->getMustContain()); @@ -167,7 +167,7 @@ public function testOpenLDAPSchema() $this->assertArrayHasKey('ou', $attributeTypes); $ou=$attributeTypes['ou']; - $this->assertType('\Zend\Ldap\Node\Schema\AttributeTypeOpenLdap', $ou); + $this->assertInstanceOf('Zend\Ldap\Node\Schema\AttributeType\OpenLdap', $ou); $this->assertEquals('ou', $ou->getName()); $this->assertEquals('2.5.4.11', $ou->getOid()); $this->assertEquals('1.3.6.1.4.1.1466.115.121.1.15', $ou->getSyntax()); diff --git a/test/Node/UpdateTest.php b/test/Node/UpdateTest.php index 11ec8f5d3..912998463 100644 --- a/test/Node/UpdateTest.php +++ b/test/Node/UpdateTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,12 +28,12 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP - * @group Zend_LDAP_Node + * @group Zend_Ldap + * @group Zend_Ldap_Node */ class UpdateTest extends \ZendTest\Ldap\OnlineTestCase { diff --git a/test/OfflineTest.php b/test/OfflineTest.php index 65d6e6f78..2ea7fb1bf 100644 --- a/test/OfflineTest.php +++ b/test/OfflineTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,25 +27,25 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class OfflineTest extends \PHPUnit_Framework_TestCase { /** - * Zend_LDAP instance + * Zend_Ldap instance * - * @var Zend_LDAP + * @var Zend_Ldap */ protected $_ldap = null; /** * Setup operations run prior to each test method: * - * * Creates an instance of Zend_LDAP + * * Creates an instance of Zend_Ldap * * @return void */ @@ -65,9 +65,9 @@ public function testInvalidOptionResultsInException() $optionName = 'invalid'; try { $this->_ldap->setOptions(array($optionName => 'irrelevant')); - $this->fail('Expected Zend_LDAP_Exception not thrown'); + $this->fail('Expected Zend_Ldap_Exception not thrown'); } catch (Ldap\Exception $e) { - $this->assertEquals("Unknown Zend_LDAP option: $optionName", $e->getMessage()); + $this->assertEquals("Unknown Zend_Ldap option: $optionName", $e->getMessage()); } } @@ -108,7 +108,8 @@ public function testOptionsGetter() 'allowEmptyPassword' => false, 'useStartTls' => false, 'optReferrals' => false, - 'tryUsernameSplit' => true + 'tryUsernameSplit' => true, + 'networkTimeout' => null, ), $ldap->getOptions()); } @@ -139,7 +140,8 @@ public function testConfigObject() 'allowEmptyPassword' => false, 'useStartTls' => false, 'optReferrals' => false, - 'tryUsernameSplit' => true + 'tryUsernameSplit' => true, + 'networkTimeout' => null, ), $ldap->getOptions()); } } diff --git a/test/OnlineTestCase.php b/test/OnlineTestCase.php index 4174db330..6fb2f243f 100644 --- a/test/OnlineTestCase.php +++ b/test/OnlineTestCase.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,16 +27,16 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ abstract class OnlineTestCase extends TestCase { /** - * @var Zend_LDAP + * @var Zend_Ldap */ private $_ldap; @@ -46,7 +46,7 @@ abstract class OnlineTestCase extends TestCase private $_nodes; /** - * @return Zend_LDAP + * @return \Zend\Ldap\Ldap */ protected function _getLDAP() { @@ -56,7 +56,7 @@ protected function _getLDAP() protected function setUp() { if (!constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) { - $this->markTestSkipped("Zend_LDAP online tests are not enabled"); + $this->markTestSkipped("Zend_Ldap online tests are not enabled"); } $options = array( diff --git a/test/SearchTest.php b/test/SearchTest.php index b50f0a8b1..38dd1fdad 100644 --- a/test/SearchTest.php +++ b/test/SearchTest.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,11 +30,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ class SearchTest extends OnlineTestCase { @@ -133,7 +133,7 @@ public function testSearchEntriesShortcut() { $entries=$this->_getLDAP()->searchEntries('(objectClass=organizationalUnit)', TESTS_ZEND_LDAP_WRITEABLE_SUBTREE, Ldap\Ldap::SEARCH_SCOPE_SUB); - $this->assertType("array", $entries); + $this->assertInternalType("array", $entries); $this->assertEquals(9, count($entries)); } @@ -232,7 +232,7 @@ public function testSearchEntriesShortcutWithDnObjectAndFilterObject() $filter=Filter::equals('objectClass', 'organizationalUnit'); $entries=$this->_getLDAP()->searchEntries($filter, $dn, Ldap\Ldap::SEARCH_SCOPE_SUB); - $this->assertType("array", $entries); + $this->assertInternalType("array", $entries); $this->assertEquals(9, count($entries)); } @@ -284,7 +284,7 @@ public function testMultipleResultIteration() /** * Test issue reported by Lance Hendrix on - * http://framework.zend.com/wiki/display/ZFPROP/Zend_LDAP+-+Extended+support+-+Stefan+Gehrig? + * http://framework.zend.com/wiki/display/ZFPROP/Zend_Ldap+-+Extended+support+-+Stefan+Gehrig? * focusedCommentId=13107431#comment-13107431 */ public function testCallingNextAfterIterationShouldNotThrowException() @@ -442,7 +442,7 @@ public function testInnerIteratorIsOfRequiredType() { $items = $this->_getLDAP()->search('(objectClass=organizationalUnit)', TESTS_ZEND_LDAP_WRITEABLE_SUBTREE, Ldap\Ldap::SEARCH_SCOPE_SUB); - $this->assertType('\Zend\Ldap\Collection\DefaultIterator', $items->getInnerIterator()); + $this->assertInstanceOf('\Zend\Ldap\Collection\DefaultIterator', $items->getInnerIterator()); } /** diff --git a/test/TestCase.php b/test/TestCase.php index dba5e3702..e1eaaaac4 100644 --- a/test/TestCase.php +++ b/test/TestCase.php @@ -13,9 +13,9 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,11 +27,11 @@ /** * @category Zend - * @package Zend_LDAP + * @package Zend_Ldap * @subpackage UnitTests - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @group Zend_LDAP + * @group Zend_Ldap */ abstract class TestCase extends \PHPUnit_Framework_TestCase { @@ -52,7 +52,7 @@ protected function _createTestArrayData() } /** - * @return Zend_LDAP_Node + * @return Zend_Ldap_Node */ protected function _createTestNode() {