public function testGetCallsFileGetContentsWithUserId() { $fileGetContents = \idfly\Moka::spy('"USER"'); $userData = new UserData($fileGetContents); $userData->get(1000); $this->assertEquals(['/data/1000.json'], $fileGetContents->report()[0]); }
/** * Adjust spy behaviour */ public function testSpyHasReport() { $spy = \idfly\Moka::spy('DEFAULT'); $spy->stubs()->with('ARG')->returns('RESULT'); $this->assertEquals('RESULT', $spy('ARG')); }