uuidString); $parse = AspectMock::func('Ramsey\Uuid\Generator', 'uuid_parse', $this->uuidBinary); $generator = new PeclUuidTimeGenerator; $uuid = $generator->generate(); $this->assertEquals($this->uuidBinary, $uuid); $create->verifyInvoked([UUID_TYPE_TIME]); $parse->verifyInvoked([$this->uuidString]); } /** * This test is for the return type of the generate method * It ensures that the generate method returns whatever value uuid_parse returns. */ public function testGenerateReturnsUuidString() { $create = AspectMock::func('Ramsey\Uuid\Generator', 'uuid_create', $this->uuidString); $parse = AspectMock::func('Ramsey\Uuid\Generator', 'uuid_parse', $this->uuidBinary); $generator = new PeclUuidTimeGenerator; $uuid = $generator->generate(); $this->assertEquals($this->uuidBinary, $uuid); $create->verifyInvoked([UUID_TYPE_TIME]); $parse->verifyInvoked([$this->uuidString]); } }