AllTests.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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-2015 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. if (!defined('PHPUnit_MAIN_METHOD')) {
  23. define('PHPUnit_MAIN_METHOD', 'Zend_Ldap_Node_AllTests::main');
  24. }
  25. require_once 'Zend/Ldap/Node/OfflineTest.php';
  26. require_once 'Zend/Ldap/Node/AttributeIterationTest.php';
  27. if (defined('TESTS_ZEND_LDAP_ONLINE_ENABLED')
  28. && constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
  29. require_once 'Zend/Ldap/Node/OnlineTest.php';
  30. require_once 'Zend/Ldap/Node/ChildrenTest.php';
  31. require_once 'Zend/Ldap/Node/ChildrenIterationTest.php';
  32. require_once 'Zend/Ldap/Node/UpdateTest.php';
  33. require_once 'Zend/Ldap/Node/RootDseTest.php';
  34. require_once 'Zend/Ldap/Node/SchemaTest.php';
  35. }
  36. /**
  37. * @category Zend
  38. * @package Zend_Ldap
  39. * @subpackage UnitTests
  40. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  41. * @license http://framework.zend.com/license/new-bsd New BSD License
  42. * @group Zend_Ldap
  43. * @group Zend_Ldap_Node
  44. */
  45. class Zend_Ldap_Node_AllTests
  46. {
  47. public static function main()
  48. {
  49. PHPUnit_TextUI_TestRunner::run(self::suite());
  50. }
  51. public static function suite()
  52. {
  53. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Ldap_Node');
  54. $suite->addTestSuite('Zend_Ldap_Node_OfflineTest');
  55. $suite->addTestSuite('Zend_Ldap_Node_AttributeIterationTest');
  56. if (defined('TESTS_ZEND_LDAP_ONLINE_ENABLED')
  57. && constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
  58. $suite->addTestSuite('Zend_Ldap_Node_OnlineTest');
  59. $suite->addTestSuite('Zend_Ldap_Node_ChildrenTest');
  60. $suite->addTestSuite('Zend_Ldap_Node_ChildrenIterationTest');
  61. $suite->addTestSuite('Zend_Ldap_Node_UpdateTest');
  62. $suite->addTestSuite('Zend_Ldap_Node_RootDseTest');
  63. $suite->addTestSuite('Zend_Ldap_Node_SchemaTest');
  64. } else {
  65. $suite->addTest(new Zend_Ldap_Node_SkipOnlineTests());
  66. }
  67. return $suite;
  68. }
  69. }
  70. class Zend_Ldap_Node_SkipOnlineTests extends PHPUnit_Framework_TestCase
  71. {
  72. public function setUp()
  73. {
  74. $this->markTestSkipped('Zend_Ldap_Node online tests not enabled in TestConfiguration.php');
  75. }
  76. public function testNothing()
  77. {
  78. }
  79. }
  80. if (PHPUnit_MAIN_METHOD == 'Zend_Ldap_Node_AllTests::main') {
  81. Zend_Ldap_Node_AllTests::main();
  82. }