Updated Tests
This commit is contained in:
parent
ed65c3809c
commit
69a342c3cb
|
@ -56,8 +56,8 @@ class BatchTest extends Scope
|
||||||
$this->assertArrayNotHasKey('errors', $response['body'][1]);
|
$this->assertArrayNotHasKey('errors', $response['body'][1]);
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']);
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body'][1]['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body'][1]['data']);
|
||||||
$this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']);
|
||||||
$this->assertEquals(195, $response['body'][1]['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body'][1]['data']['localeListCountries']['total']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testArrayBatchedMutations()
|
public function testArrayBatchedMutations()
|
||||||
|
@ -184,7 +184,7 @@ class BatchTest extends Scope
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']);
|
||||||
$this->assertArrayHasKey('localeListContinents', $response['body'][1]['data']);
|
$this->assertArrayHasKey('localeListContinents', $response['body'][1]['data']);
|
||||||
$this->assertArrayHasKey('accountCreate', $response['body'][2]['data']);
|
$this->assertArrayHasKey('accountCreate', $response['body'][2]['data']);
|
||||||
$this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']);
|
||||||
$this->assertEquals(7, $response['body'][1]['data']['localeListContinents']['total']);
|
$this->assertEquals(7, $response['body'][1]['data']['localeListContinents']['total']);
|
||||||
$this->assertEquals('Tester 1', $response['body'][2]['data']['accountCreate']['name']);
|
$this->assertEquals('Tester 1', $response['body'][2]['data']['accountCreate']['name']);
|
||||||
}
|
}
|
||||||
|
@ -225,8 +225,8 @@ class BatchTest extends Scope
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']);
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body'][1]['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body'][1]['data']);
|
||||||
$this->assertArrayHasKey('accountCreate', $response['body'][2]['data']);
|
$this->assertArrayHasKey('accountCreate', $response['body'][2]['data']);
|
||||||
$this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']);
|
||||||
$this->assertEquals(195, $response['body'][1]['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body'][1]['data']['localeListCountries']['total']);
|
||||||
$this->assertArrayHasKey('_id', $response['body'][2]['data']['accountCreate']);
|
$this->assertArrayHasKey('_id', $response['body'][2]['data']['accountCreate']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ class BatchTest extends Scope
|
||||||
$this->assertArrayNotHasKey('errors', $response['body']);
|
$this->assertArrayNotHasKey('errors', $response['body']);
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body']['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body']['data']);
|
||||||
$this->assertArrayHasKey('localeListContinents', $response['body']['data']);
|
$this->assertArrayHasKey('localeListContinents', $response['body']['data']);
|
||||||
$this->assertEquals(195, $response['body']['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body']['data']['localeListCountries']['total']);
|
||||||
$this->assertEquals(7, $response['body']['data']['localeListContinents']['total']);
|
$this->assertEquals(7, $response['body']['data']['localeListContinents']['total']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ class BatchTest extends Scope
|
||||||
$this->assertIsArray($response['body']['data']);
|
$this->assertIsArray($response['body']['data']);
|
||||||
$this->assertArrayNotHasKey('errors', $response['body']);
|
$this->assertArrayNotHasKey('errors', $response['body']);
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body']['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body']['data']);
|
||||||
$this->assertEquals(195, $response['body']['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body']['data']['localeListCountries']['total']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testQueryBatchedMutations()
|
public function testQueryBatchedMutations()
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ContentTypeTest extends Scope
|
||||||
$this->assertIsArray($response['body']['data']);
|
$this->assertIsArray($response['body']['data']);
|
||||||
$this->assertArrayNotHasKey('errors', $response['body']);
|
$this->assertArrayNotHasKey('errors', $response['body']);
|
||||||
$response = $response['body']['data']['localeListCountries'];
|
$response = $response['body']['data']['localeListCountries'];
|
||||||
$this->assertEquals(195, $response['total']);
|
$this->assertEquals(196, $response['total']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSingleQueryJSONContentType()
|
public function testSingleQueryJSONContentType()
|
||||||
|
@ -46,7 +46,7 @@ class ContentTypeTest extends Scope
|
||||||
$this->assertIsArray($response['body']['data']);
|
$this->assertIsArray($response['body']['data']);
|
||||||
$this->assertArrayNotHasKey('errors', $response['body']);
|
$this->assertArrayNotHasKey('errors', $response['body']);
|
||||||
$response = $response['body']['data']['localeListCountries'];
|
$response = $response['body']['data']['localeListCountries'];
|
||||||
$this->assertEquals(195, $response['total']);
|
$this->assertEquals(196, $response['total']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testArrayBatchedJSONContentType()
|
public function testArrayBatchedJSONContentType()
|
||||||
|
@ -69,7 +69,7 @@ class ContentTypeTest extends Scope
|
||||||
$this->assertArrayNotHasKey('errors', $response['body'][1]);
|
$this->assertArrayNotHasKey('errors', $response['body'][1]);
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body'][0]['data']);
|
||||||
$this->assertArrayHasKey('localeListContinents', $response['body'][1]['data']);
|
$this->assertArrayHasKey('localeListContinents', $response['body'][1]['data']);
|
||||||
$this->assertEquals(195, $response['body'][0]['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body'][0]['data']['localeListCountries']['total']);
|
||||||
$this->assertEquals(7, $response['body'][1]['data']['localeListContinents']['total']);
|
$this->assertEquals(7, $response['body'][1]['data']['localeListContinents']['total']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class ContentTypeTest extends Scope
|
||||||
$this->assertArrayNotHasKey('errors', $response['body']);
|
$this->assertArrayNotHasKey('errors', $response['body']);
|
||||||
$this->assertArrayHasKey('localeListCountries', $response['body']['data']);
|
$this->assertArrayHasKey('localeListCountries', $response['body']['data']);
|
||||||
$this->assertArrayHasKey('localeListContinents', $response['body']['data']);
|
$this->assertArrayHasKey('localeListContinents', $response['body']['data']);
|
||||||
$this->assertEquals(195, $response['body']['data']['localeListCountries']['total']);
|
$this->assertEquals(196, $response['body']['data']['localeListCountries']['total']);
|
||||||
$this->assertEquals(7, $response['body']['data']['localeListContinents']['total']);
|
$this->assertEquals(7, $response['body']['data']['localeListContinents']['total']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ trait LocaleBase
|
||||||
|
|
||||||
$this->assertEquals($response['headers']['status-code'], 200);
|
$this->assertEquals($response['headers']['status-code'], 200);
|
||||||
$this->assertIsArray($response['body']);
|
$this->assertIsArray($response['body']);
|
||||||
$this->assertEquals(195, $response['body']['total']);
|
$this->assertEquals(196, $response['body']['total']);
|
||||||
$this->assertEquals($response['body']['countries'][0]['name'], 'Afghanistan');
|
$this->assertEquals($response['body']['countries'][0]['name'], 'Afghanistan');
|
||||||
$this->assertEquals($response['body']['countries'][0]['code'], 'AF');
|
$this->assertEquals($response['body']['countries'][0]['code'], 'AF');
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ trait LocaleBase
|
||||||
|
|
||||||
$this->assertEquals($response['headers']['status-code'], 200);
|
$this->assertEquals($response['headers']['status-code'], 200);
|
||||||
$this->assertIsArray($response['body']);
|
$this->assertIsArray($response['body']);
|
||||||
$this->assertEquals(195, $response['body']['total']);
|
$this->assertEquals(196, $response['body']['total']);
|
||||||
$this->assertEquals($response['body']['countries'][0]['name'], 'Afganistán');
|
$this->assertEquals($response['body']['countries'][0]['name'], 'Afganistán');
|
||||||
$this->assertEquals($response['body']['countries'][0]['code'], 'AF');
|
$this->assertEquals($response['body']['countries'][0]['code'], 'AF');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue