|
@@ 27-38 (lines=12) @@
|
| 24 |
|
$this->beConstructedWith($client, $factory); |
| 25 |
|
} |
| 26 |
|
|
| 27 |
|
function it_should_get_sites(Client $client, ModelFactory $factory) |
| 28 |
|
{ |
| 29 |
|
$method = 'GET'; |
| 30 |
|
$path = 'sites'; |
| 31 |
|
|
| 32 |
|
$client->sendRequest($method, $path)->willReturn([]); |
| 33 |
|
$client->sendRequest($method, $path)->shouldBeCalled(); |
| 34 |
|
|
| 35 |
|
$factory->createMany(Site::class, [])->willReturn([]); |
| 36 |
|
|
| 37 |
|
$this->getSites(); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
function it_should_get_site(Client $client, ModelFactory $factory, Site $site) |
| 41 |
|
{ |
|
@@ 40-51 (lines=12) @@
|
| 37 |
|
$this->getSites(); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
function it_should_get_site(Client $client, ModelFactory $factory, Site $site) |
| 41 |
|
{ |
| 42 |
|
$method = 'GET'; |
| 43 |
|
$path = 'sites/1'; |
| 44 |
|
|
| 45 |
|
$client->sendRequest($method, $path)->willReturn([]); |
| 46 |
|
$client->sendRequest($method, $path)->shouldBeCalled(); |
| 47 |
|
|
| 48 |
|
$factory->create(Site::class, [])->willReturn($site); |
| 49 |
|
|
| 50 |
|
$this->getSite(1); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
function it_should_post_site( |
| 54 |
|
Client $client, |