Skip to content

Instantly share code, notes, and snippets.

@mlimaloureiro
Created September 11, 2014 11:59
Show Gist options
  • Save mlimaloureiro/5b7937978e374d77a70d to your computer and use it in GitHub Desktop.
Save mlimaloureiro/5b7937978e374d77a70d to your computer and use it in GitHub Desktop.
// src/Uniplaces/AccommodationBundle/Tests/Unit/Application/ProspectiveProperty/ProspectivePropertyQueryControllerTest.php
...
public function testSearch()
{
$properties = $this->getController()->searchAction(
$this->createGetRequest(['city' => 'GB-london'])
);
}
...
// src/Uniplaces/Tests/Unit/UniplacesApplicationUnitTestCase.php
...
/**
* @param array $query
*
* @return Request
*/
protected function createGetRequest(array $query = [])
{
return new Request(
$query,
[],
[],
[],
[],
[
'REQUEST_METHOD' => 'GET'
]
);
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment