/** * @param Task $task * @return Response */ public function call(Task $task) { $request = new Request($task); $request->setAuth($this->accountInfo->getAuthInfo()); $url = $this->accountInfo->getUrl(); $response = $this->delivery->send($url, $request); return new Response($response); }
/** * @test */ public function itShouldReturnGivenData() { $username = '******'; $password = '******'; $context = 4; $info = new Info('some url', $username, $password, $context); $this->assertEquals($username, $info->getUsername()); $this->assertEquals($password, $info->getPassword()); $this->assertEquals($context, $info->getContext()); }