Created
January 11, 2012 07:59
-
-
Save gries/1593636 to your computer and use it in GitHub Desktop.
mocking a doctrine getter the wrong way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class fooTest extends PHPUnit_Framework_TestCase | |
{ | |
public function testBar() | |
{ | |
$builder = $this->getMockBuilder('SomeDoctrineRecordClass')->disableOriginalConstructor(); | |
$mockObject = $builder->getMock(); | |
$mockObject->expects($this->any()) | |
->method('getProperty') | |
->will($this->returnValue(true)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment