public function Framework_MockBuilderTest::testMethodsToMockCanBeSpecified in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php \Framework_MockBuilderTest::testMethodsToMockCanBeSpecified()
File
- vendor/
phpunit/ phpunit-mock-objects/ tests/ MockBuilderTest.php, line 31
Class
- Framework_MockBuilderTest
- @since File available since Release 1.0.0
Code
public function testMethodsToMockCanBeSpecified() {
$spec = $this
->getMockBuilder('Mockable');
$spec
->setMethods(array(
'mockableMethod',
));
$mock = $spec
->getMock();
$this
->assertNull($mock
->mockableMethod());
$this
->assertTrue($mock
->anotherMockableMethod());
}