Complete coverage.
authorGunnar Wrobel <p@rdus.de>
Thu, 11 Feb 2010 13:57:52 +0000 (14:57 +0100)
committerGunnar Wrobel <p@rdus.de>
Thu, 11 Feb 2010 13:57:52 +0000 (14:57 +0100)
framework/Injector/test/Horde/Injector/InjectorTest.php
framework/Injector/test/Horde/Injector/phpunit.xml [new file with mode: 0644]

index 26e1fda..fa31188 100644 (file)
@@ -51,6 +51,15 @@ class Horde_Injector_InjectorTest extends PHPUnit_Framework_TestCase
         $injector->bindMock();
     }
 
+    /**
+     * @expectedException BadMethodCallException
+     */
+    public function testShouldThrowExceptionIfMethodNameIsInvalid()
+    {
+        $injector = new Horde_Injector($this->_getTopLevelNeverCalledMock());
+        $injector->invalid();
+    }
+
     public function testShouldReturnItselfWhenInjectorRequested()
     {
         $injector = new Horde_Injector($this->_getTopLevelNeverCalledMock());
diff --git a/framework/Injector/test/Horde/Injector/phpunit.xml b/framework/Injector/test/Horde/Injector/phpunit.xml
new file mode 100644 (file)
index 0000000..502d3c9
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit>
+  <filter>
+    <whitelist>
+      <directory suffix=".php">../../../lib</directory>
+    </whitelist>
+  </filter>
+</phpunit>