Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit 57fc245

Browse files
committed
Improving generator test
1 parent f0e7ce6 commit 57fc245

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/GeneratorTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ public function testGetMockForAbstractClassWithNonExistentMethods()
7373
*/
7474
public function testGetMockForAbstractClassShouldCreateStubsOnlyForAbstractMethodWhenNoMethodsWereInformed()
7575
{
76-
$mock = $this->generator->getMockForAbstractClass(
77-
'AbstractMockTestClass'
78-
);
76+
$mock = $this->generator->getMockForAbstractClass('AbstractMockTestClass');
7977

80-
$this->assertTrue(method_exists($mock, 'doSomething'));
78+
$mock->expects($this->any())
79+
->method('doSomething')
80+
->willReturn('testing');
81+
82+
$this->assertEquals('testing', $mock->doSomething());
8183
$this->assertEquals(1, $mock->returnAnything());
8284
}
8385

0 commit comments

Comments
 (0)