2
0

AllTests.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Ldap
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * Test helper
  24. */
  25. require_once dirname(__FILE__) . '/../../TestHelper.php';
  26. if (!defined('PHPUnit_MAIN_METHOD')) {
  27. define('PHPUnit_MAIN_METHOD', 'Zend_Ldap_AllTests::main');
  28. }
  29. /**
  30. * @category Zend
  31. * @package Zend_Ldap
  32. * @subpackage UnitTests
  33. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  34. * @license http://framework.zend.com/license/new-bsd New BSD License
  35. * @group Zend_Ldap
  36. */
  37. class Zend_Ldap_AllTests
  38. {
  39. public static function main()
  40. {
  41. PHPUnit_TextUI_TestRunner::run(self::suite());
  42. }
  43. public static function suite()
  44. {
  45. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Ldap');
  46. /**
  47. * @see Zend_Ldap_OfflineTest
  48. */
  49. require_once 'Zend/Ldap/OfflineTest.php';
  50. $suite->addTestSuite('Zend_Ldap_OfflineTest');
  51. /**
  52. * @see Zend_Ldap_AttributeTest
  53. */
  54. require_once 'Zend/Ldap/AttributeTest.php';
  55. $suite->addTestSuite('Zend_Ldap_AttributeTest');
  56. /**
  57. * @see Zend_Ldap_ConverterTest
  58. */
  59. require_once 'Zend/Ldap/ConverterTest.php';
  60. $suite->addTestSuite('Zend_Ldap_ConverterTest');
  61. /**
  62. * @see Zend_Ldap_Dn_AllTests
  63. */
  64. require_once 'Zend/Ldap/Dn/AllTests.php';
  65. $suite->addTest(Zend_Ldap_Dn_AllTests::suite());
  66. /**
  67. * @see Zend_Ldap_FilterTest
  68. */
  69. require_once 'Zend/Ldap/FilterTest.php';
  70. $suite->addTestSuite('Zend_Ldap_FilterTest');
  71. /**
  72. * @see Zend_Ldap_Node_AllTests
  73. */
  74. require_once 'Zend/Ldap/Node/AllTests.php';
  75. $suite->addTest(Zend_Ldap_Node_AllTests::suite());
  76. /**
  77. * @see Zend_Ldap_Ldif_AllTests
  78. */
  79. require_once 'Zend/Ldap/Ldif/AllTests.php';
  80. $suite->addTest(Zend_Ldap_Ldif_AllTests::suite());
  81. if (defined('TESTS_ZEND_LDAP_ONLINE_ENABLED')
  82. && constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
  83. /**
  84. * @see Zend_Ldap_ConnectTest
  85. */
  86. require_once 'Zend/Ldap/ConnectTest.php';
  87. $suite->addTestSuite('Zend_Ldap_ConnectTest');
  88. /**
  89. * @see Zend_Ldap_BindTest
  90. */
  91. require_once 'Zend/Ldap/BindTest.php';
  92. $suite->addTestSuite('Zend_Ldap_BindTest');
  93. /**
  94. * @see Zend_Ldap_CanonTest
  95. */
  96. require_once 'Zend/Ldap/CanonTest.php';
  97. $suite->addTestSuite('Zend_Ldap_CanonTest');
  98. /**
  99. * @see Zend_Ldap_SearchTest
  100. */
  101. require_once 'Zend/Ldap/SearchTest.php';
  102. $suite->addTestSuite('Zend_Ldap_SearchTest');
  103. /**
  104. * @see Zend_Ldap_CrudTest
  105. */
  106. require_once 'Zend/Ldap/CrudTest.php';
  107. $suite->addTestSuite('Zend_Ldap_CrudTest');
  108. /**
  109. * @see Zend_Ldap_CopyRenameTest
  110. */
  111. require_once 'Zend/Ldap/CopyRenameTest.php';
  112. $suite->addTestSuite('Zend_Ldap_CopyRenameTest');
  113. /**
  114. * @see Zend_Ldap_ChangePasswordTest
  115. */
  116. require_once 'Zend/Ldap/ChangePasswordTest.php';
  117. $suite->addTestSuite('Zend_Ldap_ChangePasswordTest');
  118. } else {
  119. $suite->addTest(new Zend_Ldap_SkipOnlineTests());
  120. }
  121. return $suite;
  122. }
  123. }
  124. /**
  125. * @category Zend
  126. * @package Zend_Ldap
  127. * @subpackage UnitTests
  128. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  129. * @license http://framework.zend.com/license/new-bsd New BSD License
  130. * @group Zend_Ldap
  131. */
  132. class Zend_Ldap_SkipOnlineTests extends PHPUnit_Framework_TestCase
  133. {
  134. public function setUp()
  135. {
  136. $this->markTestSkipped('Zend_Ldap online tests not enabled in TestConfiguration.php');
  137. }
  138. /**
  139. * @group Zend_Ldap
  140. */
  141. public function testNothing()
  142. {
  143. }
  144. }
  145. if (PHPUnit_MAIN_METHOD == 'Zend_Ldap_AllTests::main') {
  146. Zend_Ldap_AllTests::main();
  147. }