Permalink
Browse files

- Merge [4598].

  • Loading branch information...
sebastianbergmann committed Feb 1, 2009
1 parent 1e4efc6 commit 7a224a9eefa405aa92f57bbc7b5b561ca7547872
Showing with 17 additions and 0 deletions.
  1. +8 −0 PHPUnit/Tests/Framework/MockObjectTest.php
  2. +6 −0 PHPUnit/Tests/_files/AbstractMockTestClass.php
  3. +3 −0 package.xml
@@ -46,6 +46,7 @@
require_once 'PHPUnit/Framework/TestCase.php';
+require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'AbstractMockTestClass.php';
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'AnInterface.php';
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'FunctionCallback.php';
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'MethodCallback.php';
@@ -248,5 +249,12 @@ public function testOriginalCloneSettingConsidered()
$this->assertNotEquals(get_class($mock1), get_class($mock2));
}
+
+ public function testGetMockForAbstractClass()
+ {
+ $mock = $this->getMock('AbstractMockTestClass');
+ $mock->expects($this->never())
+ ->method('doSomething');
+ }
}
?>
@@ -0,0 +1,6 @@
+<?php
+abstract class AbstractMockTestClass
+{
+ abstract public function doSomething();
+}
+?>
View
@@ -909,6 +909,9 @@
</file>
</dir>
<dir name="_files">
+ <file baseinstalldir="/" name="AbstractMockTestClass.php" role="test">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
<file baseinstalldir="/" name="AbstractTest.php" role="test">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>

0 comments on commit 7a224a9

Please sign in to comment.