File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace EasyMock \Test \Fixture ;
4+
5+ interface InterfaceFixture
6+ {
7+ public function foo ();
8+ }
Original file line number Diff line number Diff line change @@ -13,11 +13,23 @@ class MockClassTest extends \PHPUnit_Framework_TestCase
1313 /**
1414 * @test
1515 */
16- public function should_generate_mock_object ()
16+ public function should_mock_objects ()
1717 {
1818 $ mock = EasyMock::mock ('EasyMock\Test\Fixture\ClassFixture ' );
1919
2020 $ this ->assertInstanceOf ('PHPUnit_Framework_MockObject_MockObject ' , $ mock );
21+ $ this ->assertNull ($ mock ->foo ());
22+ }
23+
24+ /**
25+ * @test
26+ */
27+ public function should_mock_interfaces ()
28+ {
29+ $ mock = EasyMock::mock ('EasyMock\Test\Fixture\InterfaceFixture ' );
30+
31+ $ this ->assertInstanceOf ('PHPUnit_Framework_MockObject_MockObject ' , $ mock );
32+ $ this ->assertNull ($ mock ->foo ());
2133 }
2234
2335 /**
You can’t perform that action at this time.
0 commit comments