Skip to content
Snippets Groups Projects
Commit 7572faa7 authored by Christopher C. Wells's avatar Christopher C. Wells
Browse files

Use array assertions in tests

parent 70161460
No related branches found
No related tags found
No related merge requests found
......@@ -25,10 +25,10 @@ public function testImageStylesOnJsonApiResponse() {
// Assert only the two configured image styles (large, thumbnail).
$styles = $output['included'][0]['attributes']['image_style_uri'];
$this->assertCount(2, $styles);
$this->assertObjectHasAttribute('large', $styles);
$this->assertObjectHasAttribute('thumbnail', $styles);
$this->assertObjectNotHasAttribute('wide', $styles);
$this->assertObjectNotHasAttribute('medium', $styles);
$this->assertArrayHasKey('large', $styles);
$this->assertArrayHasKey('thumbnail', $styles);
$this->assertArrayNotHasKey('wide', $styles);
$this->assertArrayNotHasKey('medium', $styles);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment