for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace spec\Akeneo\Crowdin\Api;
use Akeneo\Crowdin\Client;
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class SupportedLanguagesSpec extends ObjectBehavior
{
public function let(Client $client, HttpClient $http, Request $request, Response $response)
$request
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$client->getHttpClient()->willReturn($http);
$http->get('supported-languages')->willReturn($response);
$response->getBody()->willReturn('<xml></xml>');
$this->beConstructedWith($client);
}
public function it_should_be_an_api()
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
public function it_gets_supported_languages()
$this->execute()->shouldBe('<xml></xml>');
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.