DependencyContainerAcceptanceTest.php 565B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. require_once 'swift_required.php';
  3. require_once 'Swift/Tests/SwiftUnitTestCase.php';
  4. //This is more of a "cross your fingers and hope it works" test!
  5. class Swift_DependencyContainerAcceptanceTest
  6. extends Swift_Tests_SwiftUnitTestCase
  7. {
  8. public function testNoLookupsFail()
  9. {
  10. $di = Swift_DependencyContainer::getInstance();
  11. foreach ($di->listItems() as $itemName)
  12. {
  13. try
  14. {
  15. $di->lookup($itemName);
  16. }
  17. catch (Swift_DependencyException $e)
  18. {
  19. $this->fail($e->getMessage());
  20. }
  21. }
  22. }
  23. }