Permalink
Browse files

Register an autoloader in TestHelper.php rather than try to require_o…

…nce everything in separate tests. Tests are *far* more likely to run separately now.

git-svn-id: http://svn.php.net/repository/pear/packages/HTML_QuickForm2/branches/repeat_element@325139 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 799cdac commit 4bd9cd35a27e94c8e75acfef093af14fa8276af6 @sad-spirit sad-spirit committed Apr 13, 2012
Showing with 2 additions and 496 deletions.
  1. +0 −5 tests/QuickForm2/Container/FieldsetTest.php
  2. +0 −10 tests/QuickForm2/Container/GroupTest.php
  3. +0 −11 tests/QuickForm2/Container/RepeatTest.php
  4. +0 −16 tests/QuickForm2/ContainerOverloadTest.php
  5. +0 −20 tests/QuickForm2/ContainerTest.php
  6. +0 −9 tests/QuickForm2/Controller/Action/BackTest.php
  7. +0 −9 tests/QuickForm2/Controller/Action/DirectTest.php
  8. +0 −9 tests/QuickForm2/Controller/Action/DisplayTest.php
  9. +0 −9 tests/QuickForm2/Controller/Action/JumpTest.php
  10. +0 −9 tests/QuickForm2/Controller/Action/NextTest.php
  11. +0 −9 tests/QuickForm2/Controller/Action/SubmitTest.php
  12. +0 −6 tests/QuickForm2/Controller/PageTest.php
  13. +0 −9 tests/QuickForm2/ControllerTest.php
  14. +0 −5 tests/QuickForm2/DataSource/ArrayTest.php
  15. +0 −5 tests/QuickForm2/DataSource/SuperGlobalTest.php
  16. +0 −10 tests/QuickForm2/Element/ButtonTest.php
  17. +0 −3 tests/QuickForm2/Element/DateTest.php
  18. +0 −4 tests/QuickForm2/Element/HierselectTest.php
  19. +0 −5 tests/QuickForm2/Element/InputButtonTest.php
  20. +0 −15 tests/QuickForm2/Element/InputCheckableTest.php
  21. +0 −10 tests/QuickForm2/Element/InputCheckboxTest.php
  22. +0 −13 tests/QuickForm2/Element/InputFileTest.php
  23. +0 −5 tests/QuickForm2/Element/InputHiddenTest.php
  24. +0 −10 tests/QuickForm2/Element/InputImageTest.php
  25. +0 −5 tests/QuickForm2/Element/InputPasswordTest.php
  26. +0 −5 tests/QuickForm2/Element/InputResetTest.php
  27. +0 −10 tests/QuickForm2/Element/InputSubmitTest.php
  28. +0 −5 tests/QuickForm2/Element/InputTest.php
  29. +0 −5 tests/QuickForm2/Element/SelectTest.php
  30. +0 −10 tests/QuickForm2/Element/StaticTest.php
  31. +0 −5 tests/QuickForm2/Element/TextareaTest.php
  32. +0 −10 tests/QuickForm2/ElementTest.php
  33. +0 −10 tests/QuickForm2/FactoryTest.php
  34. +0 −4 tests/QuickForm2/FilterTest.php
  35. +0 −17 tests/QuickForm2/JavascriptBuilderTest.php
  36. +0 −10 tests/QuickForm2/NodeTest.php
  37. +0 −10 tests/QuickForm2/Renderer/ArrayTest.php
  38. +0 −10 tests/QuickForm2/Renderer/CallbackTest.php
  39. +0 −10 tests/QuickForm2/Renderer/DefaultTest.php
  40. +0 −4 tests/QuickForm2/Renderer/StubTest.php
  41. +0 −10 tests/QuickForm2/RendererTest.php
  42. +0 −10 tests/QuickForm2/Rule/CallbackTest.php
  43. +0 −10 tests/QuickForm2/Rule/CompareTest.php
  44. +0 −6 tests/QuickForm2/Rule/EachTest.php
  45. +0 −7 tests/QuickForm2/Rule/EmailTest.php
  46. +0 −10 tests/QuickForm2/Rule/EmptyTest.php
  47. +0 −10 tests/QuickForm2/Rule/LengthTest.php
  48. +0 −10 tests/QuickForm2/Rule/MaxFileSizeTest.php
  49. +0 −10 tests/QuickForm2/Rule/MimeTypeTest.php
  50. +0 −8 tests/QuickForm2/Rule/NonemptyTest.php
  51. +0 −11 tests/QuickForm2/Rule/NotCallbackTest.php
  52. +0 −10 tests/QuickForm2/Rule/NotRegexTest.php
  53. +0 −10 tests/QuickForm2/Rule/RegexTest.php
  54. +0 −10 tests/QuickForm2/Rule/RequiredTest.php
  55. +0 −12 tests/QuickForm2/RuleTest.php
  56. +0 −6 tests/QuickForm2Test.php
  57. +2 −0 tests/TestHelper.php
@@ -46,11 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <fieldset> elements
- */
-require_once 'HTML/QuickForm2/Container/Fieldset.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_Fieldset class
*/
class HTML_QuickForm2_Element_FieldsetTest extends PHPUnit_Framework_TestCase
@@ -46,16 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <group> elements
- */
-require_once 'HTML/QuickForm2/Container/Group.php';
-
-/**
- * Class representing a HTML form
- */
-require_once 'HTML/QuickForm2.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_Group class
*/
class HTML_QuickForm2_Element_GroupTest extends PHPUnit_Framework_TestCase
@@ -44,17 +44,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
-/** Handles a Container that can be repeated multiple times in the form */
-require_once 'HTML/QuickForm2/Container/Repeat.php';
-/** Class for <fieldset> elements */
-require_once 'HTML/QuickForm2/Container/Fieldset.php';
-/** Class for <input type="text" /> elements */
-require_once 'HTML/QuickForm2/Element/InputText.php';
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-/** Base class for HTML_QuickForm2 renderers */
-require_once 'HTML/QuickForm2/Renderer.php';
-
/**
* Unit test for HTML_QuickForm2_Container_Repeat class
@@ -47,22 +47,6 @@
require_once dirname(dirname(__FILE__)) . '/TestHelper.php';
/**
- * Container class
- */
-require_once 'HTML/QuickForm2/Container.php';
-
-/**
- * Base class for "scalar" elements
- */
-require_once 'HTML/QuickForm2/Element.php';
-
-/**
- * Base class for "checkbox" elements, used in tests
- */
-require_once 'HTML/QuickForm2/Element/InputCheckbox.php';
-
-
-/**
* Unit test for HTML_QuickForm2_Container overloaded methods
*/
class HTML_QuickForm2_ContainerOverloadTest extends PHPUnit_Framework_TestCase
@@ -46,26 +46,6 @@
require_once dirname(dirname(__FILE__)) . '/TestHelper.php';
/**
- * Container class
- */
-require_once 'HTML/QuickForm2/Container.php';
-
-/**
- * Base class for "scalar" elements
- */
-require_once 'HTML/QuickForm2/Element.php';
-
-/**
- * Base class for HTML_QuickForm2 rules
- */
-require_once 'HTML/QuickForm2/Rule.php';
-
-/**
- * Base class for HTML_QuickForm2 renderers
- */
-require_once 'HTML/QuickForm2/Renderer.php';
-
-/**
* A non-abstract subclass of Element
*
* Element class is still abstract, we should "implement" the remaining methods.
@@ -45,15 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-/** Class implementing the Page Controller pattern for multipage forms */
-require_once 'HTML/QuickForm2/Controller.php';
-
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-
-/** Action handler for a 'back' button of wizard-type multipage form */
-require_once 'HTML/QuickForm2/Controller/Action/Back.php';
-
/**
* Unit test for HTML_QuickForm2_Controller_Action_Back class
*/
@@ -45,15 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-/** Class implementing the Page Controller pattern for multipage forms */
-require_once 'HTML/QuickForm2/Controller.php';
-
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-
-/** Action handler for going to a specific page of a multipage form */
-require_once 'HTML/QuickForm2/Controller/Action/Direct.php';
-
/**
* Unit test for HTML_QuickForm2_Controller_Action_Direct class
*/
@@ -45,15 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-/** Class implementing the Page Controller pattern for multipage forms */
-require_once 'HTML/QuickForm2/Controller.php';
-
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-
-/** Action handler for outputting the form */
-require_once 'HTML/QuickForm2/Controller/Action/Display.php';
-
/**
* Unit test for HTML_QuickForm2_Controller_Action_Display class
*/
@@ -45,15 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-/** Class implementing the Page Controller pattern for multipage forms */
-require_once 'HTML/QuickForm2/Controller.php';
-
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-
-/** This handler performs an HTTP redirect to a specific page */
-require_once 'HTML/QuickForm2/Controller/Action/Jump.php';
-
/**
* Unit test for HTML_QuickForm2_Controller_Action_Jump class
*/
@@ -45,15 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-/** Class implementing the Page Controller pattern for multipage forms */
-require_once 'HTML/QuickForm2/Controller.php';
-
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-
-/** Action handler for a 'next' button of wizard-type multipage form */
-require_once 'HTML/QuickForm2/Controller/Action/Next.php';
-
/**
* Unit test for HTML_QuickForm2_Controller_Action_Next class
*/
@@ -45,15 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-/** Class implementing the Page Controller pattern for multipage forms */
-require_once 'HTML/QuickForm2/Controller.php';
-
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-
-/** Action handler for a 'submit' button */
-require_once 'HTML/QuickForm2/Controller/Action/Submit.php';
-
/**
* Unit test for HTML_QuickForm2_Controller_Action_Submit class
*/
@@ -45,12 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
-/** Class implementing the Page Controller pattern for multipage forms */
-require_once 'HTML/QuickForm2/Controller.php';
-
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-
/**
* Unit test for HTML_QuickForm2_Controller_Page class
*/
@@ -45,15 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(__FILE__)) . '/TestHelper.php';
-/** Class implementing the Page Controller pattern for multipage forms */
-require_once 'HTML/QuickForm2/Controller.php';
-
-/** Interface for Controller action handlers */
-require_once 'HTML/QuickForm2/Controller/Action.php';
-
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
-
/**
* Unit test for HTML_QuickForm2_Controller class
*/
@@ -46,11 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Array-based data source for HTML_QuickForm2 objects
- */
-require_once 'HTML/QuickForm2/DataSource/Array.php';
-
-/**
* Unit test for array-based data source
*/
class HTML_QuickForm2_DataSource_ArrayTest extends PHPUnit_Framework_TestCase
@@ -46,11 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Data source for HTML_QuickForm2 objects based on superglobal arrays
- */
-require_once 'HTML/QuickForm2/DataSource/SuperGlobal.php';
-
-/**
* Unit test for superglobal-based data source
*/
class HTML_QuickForm2_DataSource_SuperGlobalTest extends PHPUnit_Framework_TestCase
@@ -46,16 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <button> elements
- */
-require_once 'HTML/QuickForm2/Element/Button.php';
-
-/**
- * Class representing a HTML form
- */
-require_once 'HTML/QuickForm2.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_Button class
*/
class HTML_QuickForm2_Element_ButtonTest extends PHPUnit_Framework_TestCase
@@ -45,9 +45,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
-/** Date element */
-require_once 'HTML/QuickForm2/Element/Date.php';
-
class HTML_QuickForm2_Element_DateTest extends PHPUnit_Framework_TestCase
{
/**
@@ -44,10 +44,6 @@
/** Sets up includes */
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
-/** Hierarchical select element */
-require_once 'HTML/QuickForm2/Element/Hierselect.php';
-/** Class representing a HTML form */
-require_once 'HTML/QuickForm2.php';
/**
* Unit test for HTML_QuickForm2_Element_Hierselect class
@@ -46,11 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <input type="button" /> elements
- */
-require_once 'HTML/QuickForm2/Element/InputButton.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_InputButton class
*/
class HTML_QuickForm2_Element_InputButtonTest extends PHPUnit_Framework_TestCase
@@ -46,21 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Base class for radios and checkboxes
- */
-require_once 'HTML/QuickForm2/Element/InputCheckable.php';
-
-/**
- * Array-based data source for HTML_QuickForm2 objects
- */
-require_once 'HTML/QuickForm2/DataSource/Array.php';
-
-/**
- * Class representing a HTML form
- */
-require_once 'HTML/QuickForm2.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_InputCheckable class
*/
class HTML_QuickForm2_Element_InputCheckableTest extends PHPUnit_Framework_TestCase
@@ -46,16 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <input type="checkbox" /> elements
- */
-require_once 'HTML/QuickForm2/Element/InputCheckbox.php';
-
-/**
- * Class representing a HTML form
- */
-require_once 'HTML/QuickForm2.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_InputCheckbox class
*/
class HTML_QuickForm2_Element_InputCheckboxTest extends PHPUnit_Framework_TestCase
@@ -46,19 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <input type="file" /> elements
- */
-require_once 'HTML/QuickForm2/Element/InputFile.php';
-
-/**
- * Class representing a HTML form
- */
-require_once 'HTML/QuickForm2.php';
-
-/** Interface for classes that supply (translated) messages for the elements */
-require_once 'HTML/QuickForm2/MessageProvider.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_InputFile class
*/
class HTML_QuickForm2_Element_InputFileTest extends PHPUnit_Framework_TestCase
@@ -46,11 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <input type="hidden" /> elements
- */
-require_once 'HTML/QuickForm2/Element/InputHidden.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_InputHidden class
*/
class HTML_QuickForm2_Element_InputHiddenTest extends PHPUnit_Framework_TestCase
@@ -46,16 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <input type="image" /> elements
- */
-require_once 'HTML/QuickForm2/Element/InputImage.php';
-
-/**
- * Class representing a HTML form
- */
-require_once 'HTML/QuickForm2.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_InputImage class
*/
class HTML_QuickForm2_Element_InputImageTest extends PHPUnit_Framework_TestCase
@@ -46,11 +46,6 @@
require_once dirname(dirname(dirname(__FILE__))) . '/TestHelper.php';
/**
- * Class for <input type="password" /> elements
- */
-require_once 'HTML/QuickForm2/Element/InputPassword.php';
-
-/**
* Unit test for HTML_QuickForm2_Element_InputCheckbox class
*/
class HTML_QuickForm2_Element_InputPasswordTest extends PHPUnit_Framework_TestCase
Oops, something went wrong.

0 comments on commit 4bd9cd3

Please sign in to comment.