Skip to content

Commit

Permalink
Merge [4598].
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 1, 2009
1 parent 95296f6 commit e72dfdf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PHPUnit/Tests/Framework/MockObjectTest.php
Expand Up @@ -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';
Expand Down Expand Up @@ -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');
}
}
?>
6 changes: 6 additions & 0 deletions PHPUnit/Tests/_files/AbstractMockTestClass.php
@@ -0,0 +1,6 @@
<?php
abstract class AbstractMockTestClass
{
abstract public function doSomething();
}
?>
3 changes: 3 additions & 0 deletions package.xml
Expand Up @@ -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>
Expand Down

0 comments on commit e72dfdf

Please sign in to comment.