Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Merge [4598].

  • Loading branch information...
commit 7a224a9eefa405aa92f57bbc7b5b561ca7547872 1 parent 1e4efc6
@sebastianbergmann authored
View
8 PHPUnit/Tests/Framework/MockObjectTest.php
@@ -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');
+ }
}
?>
View
6 PHPUnit/Tests/_files/AbstractMockTestClass.php
@@ -0,0 +1,6 @@
+<?php
+abstract class AbstractMockTestClass
+{
+ abstract public function doSomething();
+}
+?>
View
3  package.xml
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.