php Programming Glossary: getmockforabstractclass
Best practices to test protected methods with PHPUnit (on abstract classes) http://stackoverflow.com/questions/5010300/best-practices-to-test-protected-methods-with-phpunit-on-abstract-classes is fine for normal methods for abstract stuff use ... getMockForAbstractClass But please do so only if it is really necessary. A protected..
Mocking concrete method in abstract class using phpunit http://stackoverflow.com/questions/8040296/mocking-concrete-method-in-abstract-class-using-phpunit making the test fragile and too verbose. MockBuilder getMockForAbstractClass ignores setMethod . Here are some unit tests examplifying the.. methods. public function testAbstractMethod stub this getMockForAbstractClass 'AbstractClass' stub expects this any method 'abstractMethod'.. methods too. public function testConcreteMethod stub this getMockForAbstractClass 'AbstractClass' stub expects this any method 'concreteMethod'..
|