public function testAllowsCombinationOfMockAndStub() { Mokka::verify($this->_mock)->setBar(); Mokka::when($this->_mock)->setBar()->thenReturn(TRUE); $this->assertTrue($this->_mock->setBar()); }
/** * @param MockInterface $mock * @param InvokationRule|NULL|int $expectedInvokationCount * @throws \InvalidArgumentException * @return MockInterface */ public static function verify(MockInterface $mock, $expectedInvokationCount = null) { $mock->listenForVerification($expectedInvokationCount); return $mock; }