Skip to content

Instantly share code, notes, and snippets.

@hpatoio
Last active September 10, 2015 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hpatoio/bcb12826fb1e34cf2c9a to your computer and use it in GitHub Desktop.
Save hpatoio/bcb12826fb1e34cf2c9a to your computer and use it in GitHub Desktop.
<?php
public function testGetCitiesList()
{
$getClient = static::createClient([]);
$getClient->request(
'GET',
'/api/v3/cities',
[],
[],
['HTTP_ACCEPT' => 'application/json']
);
$response = $getClient->getResponse();
$this->assertJsonResponse($response);
$this->assertJsonResponseContent($response, 'get-cities');
}
public function testGetCitiesListInItalian()
{
$getClient = static::createClient([]);
$getClient->request(
'GET',
'/api/v3/cities',
[],
[],
[
'HTTP_ACCEPT' => 'application/json',
'HTTP_ACCEPT-LANGUAGE' => 'it-it,it;q=0.5'
]
);
$response = $getClient->getResponse();
$this->assertJsonResponse($response);
$this->assertJsonResponseContent($response, 'get-cities-it');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment