Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsonapi_image_styles
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
jsonapi_image_styles
Commits
7572faa7
Commit
7572faa7
authored
3 years ago
by
Christopher C. Wells
Browse files
Options
Downloads
Patches
Plain Diff
Use array assertions in tests
parent
70161460
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Functional/JsonApiImageStylesFunctionalTest.php
+4
-4
4 additions, 4 deletions
tests/src/Functional/JsonApiImageStylesFunctionalTest.php
with
4 additions
and
4 deletions
tests/src/Functional/JsonApiImageStylesFunctionalTest.php
+
4
−
4
View file @
7572faa7
...
...
@@ -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
->
assert
ObjectHasAttribute
(
'large'
,
$styles
);
$this
->
assert
ObjectHasAttribute
(
'thumbnail'
,
$styles
);
$this
->
assert
ObjectNotHasAttribute
(
'wide'
,
$styles
);
$this
->
assert
ObjectNotHasAttribute
(
'medium'
,
$styles
);
$this
->
assert
ArrayHasKey
(
'large'
,
$styles
);
$this
->
assert
ArrayHasKey
(
'thumbnail'
,
$styles
);
$this
->
assert
ArrayNotHasKey
(
'wide'
,
$styles
);
$this
->
assert
ArrayNotHasKey
(
'medium'
,
$styles
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment