AllTests.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
  26. if (!defined('PHPUnit_MAIN_METHOD')) {
  27. define('PHPUnit_MAIN_METHOD', 'Zend_Ldap_Node_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. * @group Zend_Ldap_Node
  37. */
  38. class Zend_Ldap_Node_AllTests
  39. {
  40. public static function main()
  41. {
  42. PHPUnit_TextUI_TestRunner::run(self::suite());
  43. }
  44. public static function suite()
  45. {
  46. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Ldap_Node');
  47. /**
  48. * @see Zend_Ldap_Node_OfflineTest
  49. */
  50. require_once 'Zend/Ldap/Node/OfflineTest.php';
  51. $suite->addTestSuite('Zend_Ldap_Node_OfflineTest');
  52. /**
  53. * @see Zend_Ldap_Node_AttributeIterationTest
  54. */
  55. require_once 'Zend/Ldap/Node/AttributeIterationTest.php';
  56. $suite->addTestSuite('Zend_Ldap_Node_AttributeIterationTest');
  57. if (defined('TESTS_ZEND_LDAP_ONLINE_ENABLED')
  58. && constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
  59. /**
  60. * @see Zend_Ldap_Node_OnlineTest
  61. */
  62. require_once 'Zend/Ldap/Node/OnlineTest.php';
  63. $suite->addTestSuite('Zend_Ldap_Node_OnlineTest');
  64. /**
  65. * @see Zend_Ldap_Node_ChildrenTest
  66. */
  67. require_once 'Zend/Ldap/Node/ChildrenTest.php';
  68. $suite->addTestSuite('Zend_Ldap_Node_ChildrenTest');
  69. /**
  70. * @see Zend_Ldap_Node_ChildrenIterationTest
  71. */
  72. require_once 'Zend/Ldap/Node/ChildrenIterationTest.php';
  73. $suite->addTestSuite('Zend_Ldap_Node_ChildrenIterationTest');
  74. /**
  75. * @see Zend_Ldap_Node_UpdateTest
  76. */
  77. require_once 'Zend/Ldap/Node/UpdateTest.php';
  78. $suite->addTestSuite('Zend_Ldap_Node_UpdateTest');
  79. /**
  80. * @see Zend_Ldap_Node_RootDseTest
  81. */
  82. require_once 'Zend/Ldap/Node/RootDseTest.php';
  83. $suite->addTestSuite('Zend_Ldap_Node_RootDseTest');
  84. /**
  85. * @see Zend_Ldap_Node_SchemaTest
  86. */
  87. require_once 'Zend/Ldap/Node/SchemaTest.php';
  88. $suite->addTestSuite('Zend_Ldap_Node_SchemaTest');
  89. } else {
  90. $suite->addTest(new Zend_Ldap_Node_SkipOnlineTests());
  91. }
  92. return $suite;
  93. }
  94. }
  95. class Zend_Ldap_Node_SkipOnlineTests extends PHPUnit_Framework_TestCase
  96. {
  97. public function setUp()
  98. {
  99. $this->markTestSkipped('Zend_Ldap_Node online tests not enabled in TestConfiguration.php');
  100. }
  101. public function testNothing()
  102. {
  103. }
  104. }
  105. if (PHPUnit_MAIN_METHOD == 'Zend_Ldap_Node_AllTests::main') {
  106. Zend_Ldap_Node_AllTests::main();
  107. }