release 0.8 (#567)

This commit is contained in:
Kevin Papst
2019-02-19 11:03:11 +01:00
committed by GitHub
parent b4f1cae323
commit 47b7046743
40 changed files with 446 additions and 341 deletions

View File

@@ -28,7 +28,20 @@ class CustomerControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/customers');
$result = json_decode($client->getResponse()->getContent(), true);
$this->assertInternalType('array', $result);
$this->assertIsArray($result);
$this->assertNotEmpty($result);
$this->assertEquals(1, count($result));
$this->assertStructure($result[0], false);
}
public function testGetCollectionWithQuery()
{
$query = ['order' => 'ASC', 'orderBy' => 'name', 'visible' => 3];
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->assertAccessIsGranted($client, '/api/customers', 'GET', $query);
$result = json_decode($client->getResponse()->getContent(), true);
$this->assertIsArray($result);
$this->assertNotEmpty($result);
$this->assertEquals(1, count($result));
$this->assertStructure($result[0], false);
@@ -40,7 +53,7 @@ class CustomerControllerTest extends APIControllerBaseTest
$this->assertAccessIsGranted($client, '/api/customers/1');
$result = json_decode($client->getResponse()->getContent(), true);
$this->assertInternalType('array', $result);
$this->assertIsArray($result);
$this->assertStructure($result, true);
}