Source for file ModuleFactory.php

Documentation is available at ModuleFactory.php

  1. <?php
  2. /**
  3. * Test the Module Factory
  4. *
  5. * This file is part of CompInaBox.
  6. * @package Tests
  7. * @subpackage InputControllers
  8. * @author Eric D. Nielsen <nielsene@alum.mit.edu>
  9. * @copyright CompInaBox Copyright 2005, Eric D. Nielsen. All Rights Reserved.
  10. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  11. */
  12.  
  13. /** Load the to be tested class */
  14. (COMPINABOX.'include/classes/controllers/ModuleFactory.inc');
  15. /**
  16. * TestModuleFactory
  17. * @package Tests
  18. * @subpackage InputControllers
  19. */
  20. class TestTestModuleFactory extends UnitTestCase {
  21. var $factory;
  22. function TestModuleFactory() {
  23. $this->UnitTestCase('TestModuleFactory');
  24. }
  25.  
  26. function setUp() {
  27. $this->factory =& new ModuleFactory("SlidingDoorsAdmin");
  28. }
  29. function tearDown() {
  30. }
  31.  
  32. function testCreateController() {
  33. $controller = $this->factory->createController();
  34. $this->assertIsA($controller, "SlidingDoorsAdminController");
  35. }
  36. function testCreateContext() {
  37. $con = $this->factory->createContext();
  38. $this->assertIsA($con, "SlidingDoorsAdminContext");
  39. }
  40. function testCreateRequest() {
  41. $req = $this->factory->createRequest();
  42. $this->assertIsA($req, "SlidingDoorsAdminRequest");
  43. }
  44. function testCreatePreHandlers() {
  45. $handlers = $this->factory->createPreHandlers();
  46. $this->assertIsA($handlers, "SlidingDoorsAdminHandlerChain");
  47. }
  48. }
  49.  
  50. ?>

Documentation generated on Tue, 25 Apr 2006 13:05:07 -0400 by phpDocumentor 1.3.0RC3