File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
tests/Behat/Context/Setup Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ Feature: Removing guest wishlists
2222
2323 @cli
2424 Scenario : Removing guest wishlists with date
25- Given there is a guest wishlist which has been inactive for a week
26- And there are 2 wishlists in the database
25+ Given there is a guest wishlist which has been inactive for 5 days
26+ And there is a guest wishlist which has been inactive for 4 days
27+ And there are 3 wishlists in the database
2728 When I run delete guests wishlists command to delete wishlists inactive for more than 5 days
2829 Then the command should succeed
29- And there is 1 wishlist in the database
30+ And there are 2 wishlists in the database
3031
3132 @cli
3233 Scenario : Removing guest wishlists with invalid date
Original file line number Diff line number Diff line change @@ -159,15 +159,15 @@ public function userHasAWishlist(string $email): void
159159 }
160160
161161 /**
162- * @When there is a guest wishlist which has been inactive for a week
162+ * @When there is a guest wishlist which has been inactive for :days days
163163 */
164- public function thereIsAGuestWishlistInactiveForAWeek ( ): void
164+ public function thereIsAGuestWishlistInactiveForDays ( int $ days ): void
165165 {
166166 $ wishlist = new Wishlist ();
167167 $ channel = $ this ->channelRepository ->findOneByCode ('WEB-US ' );
168168
169169 $ updatedAt = new \DateTime ();
170- $ updatedAt ->modify (' -7 days ' );
170+ $ updatedAt ->modify (\sprintf ( ' -%d days ', $ days ) );
171171
172172 $ wishlist ->setChannel ($ channel );
173173 $ wishlist ->setUpdatedAt ($ updatedAt );
You can’t perform that action at this time.
0 commit comments