AllTests.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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-2010 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. require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
  23. if (!defined('PHPUnit_MAIN_METHOD')) {
  24. define('PHPUnit_MAIN_METHOD', 'Zend_Ldap_AllTests::main');
  25. }
  26. require_once 'Zend/Ldap/OfflineTest.php';
  27. require_once 'Zend/Ldap/AttributeTest.php';
  28. require_once 'Zend/Ldap/ConverterTest.php';
  29. require_once 'Zend/Ldap/Dn/AllTests.php';
  30. require_once 'Zend/Ldap/FilterTest.php';
  31. require_once 'Zend/Ldap/Node/AllTests.php';
  32. require_once 'Zend/Ldap/Ldif/AllTests.php';
  33. if (defined('TESTS_ZEND_LDAP_ONLINE_ENABLED')
  34. && constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
  35. require_once 'Zend/Ldap/ConnectTest.php';
  36. require_once 'Zend/Ldap/BindTest.php';
  37. require_once 'Zend/Ldap/CanonTest.php';
  38. require_once 'Zend/Ldap/SearchTest.php';
  39. require_once 'Zend/Ldap/CrudTest.php';
  40. require_once 'Zend/Ldap/CopyRenameTest.php';
  41. require_once 'Zend/Ldap/ChangePasswordTest.php';
  42. }
  43. /**
  44. * @category Zend
  45. * @package Zend_Ldap
  46. * @subpackage UnitTests
  47. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  48. * @license http://framework.zend.com/license/new-bsd New BSD License
  49. * @group Zend_Ldap
  50. */
  51. class Zend_Ldap_AllTests
  52. {
  53. public static function main()
  54. {
  55. PHPUnit_TextUI_TestRunner::run(self::suite());
  56. }
  57. public static function suite()
  58. {
  59. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Ldap');
  60. $suite->addTestSuite('Zend_Ldap_OfflineTest');
  61. $suite->addTestSuite('Zend_Ldap_AttributeTest');
  62. $suite->addTestSuite('Zend_Ldap_ConverterTest');
  63. $suite->addTest(Zend_Ldap_Dn_AllTests::suite());
  64. $suite->addTestSuite('Zend_Ldap_FilterTest');
  65. $suite->addTest(Zend_Ldap_Node_AllTests::suite());
  66. $suite->addTest(Zend_Ldap_Ldif_AllTests::suite());
  67. if (defined('TESTS_ZEND_LDAP_ONLINE_ENABLED')
  68. && constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
  69. $suite->addTestSuite('Zend_Ldap_ConnectTest');
  70. $suite->addTestSuite('Zend_Ldap_BindTest');
  71. $suite->addTestSuite('Zend_Ldap_CanonTest');
  72. $suite->addTestSuite('Zend_Ldap_SearchTest');
  73. $suite->addTestSuite('Zend_Ldap_CrudTest');
  74. $suite->addTestSuite('Zend_Ldap_CopyRenameTest');
  75. $suite->addTestSuite('Zend_Ldap_ChangePasswordTest');
  76. } else {
  77. $suite->addTest(new Zend_Ldap_SkipOnlineTests());
  78. }
  79. return $suite;
  80. }
  81. }
  82. /**
  83. * @category Zend
  84. * @package Zend_Ldap
  85. * @subpackage UnitTests
  86. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  87. * @license http://framework.zend.com/license/new-bsd New BSD License
  88. * @group Zend_Ldap
  89. */
  90. class Zend_Ldap_SkipOnlineTests extends PHPUnit_Framework_TestCase
  91. {
  92. public function setUp()
  93. {
  94. $this->markTestSkipped('Zend_Ldap online tests not enabled in TestConfiguration.php');
  95. }
  96. /**
  97. * @group Zend_Ldap
  98. */
  99. public function testNothing()
  100. {
  101. }
  102. }
  103. if (PHPUnit_MAIN_METHOD == 'Zend_Ldap_AllTests::main') {
  104. Zend_Ldap_AllTests::main();
  105. }