Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Behat test for invalid list data #32

Merged
merged 2 commits into from
Jul 11, 2023
Merged

Conversation

kasperg
Copy link
Contributor

@kasperg kasperg commented Jul 11, 2023

This should ensure that the implementation works as expected.

This should ensure that the implementation works as expected.
@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2023

Codecov Report

Merging #32 (da0c241) into develop (e93601e) will increase coverage by 1.58%.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##             develop      #32      +/-   ##
=============================================
+ Coverage      96.03%   97.61%   +1.58%     
  Complexity        42       42              
=============================================
  Files              6        6              
  Lines            126      126              
=============================================
+ Hits             121      123       +2     
+ Misses             5        3       -2     
Flag Coverage Δ
Behaviour 94.44% <100.00%> (+1.58%) ⬆️
Unit 46.82% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
app/Http/Controllers/v1/ListController.php 100.00% <100.00%> (+2.89%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

If an item has been removed then filter() will remove the null value
but preserve the keys of the remaining items. In JSON this will 
effectively turn the array into an object with keys.

Use values() to reset the keys.

Example: List with 3 items
Before: With entry 1 removed the remaining keys will be index 0 and 2.
After: With entry 1 remove the remaining keys will be 0 and 1.
@kasperg kasperg marked this pull request as ready for review July 11, 2023 21:14
@kasperg kasperg merged commit 420487e into develop Jul 11, 2023
@kasperg kasperg deleted the fix/handle-invalid-list-data branch July 11, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants