Skip to content

Instantly share code, notes, and snippets.

@kamaulynder
Created September 14, 2016 05:34
Show Gist options
  • Save kamaulynder/02dafde1199cfc1f6d8ee319baf2577c to your computer and use it in GitHub Desktop.
Save kamaulynder/02dafde1199cfc1f6d8ee319baf2577c to your computer and use it in GitHub Desktop.
@@ -15,9 +15,14 @@ class UserCest
$I->sendGET($this->endpoint);
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
- $I->seeResponseContainsJson(['name' => 'Test user','email' => '[email protected]']);
- $I->seeResponseContainsJson(['name' => 'Admin user','email' => '[email protected]']);
-
+ $I->seeResponseContainsJson([
+ ['name' => 'Test User',
+ 'email' => '[email protected]'
+ ],
+ ['name' => 'Admin User',
+ 'email' => '[email protected]'
+ ]
+ ]);
}
/*
@@ -46,8 +51,11 @@ class UserCest
$I->sendGET($this->endpoint."/$id");
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
- $I->seeResponseContainsJson(['name' => 'Test user']);
-
+ $I->seeResponseContainsJson([
+ ['name' => 'Test User',
+ 'email' => '[email protected]'
+ ]
+ ]);
}
/*
@@ -80,7 +88,11 @@ class UserCest
]);
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
- $I->seeResponseContainsJson(['name' => 'Nat Manning']);
+ $I->seeResponseContainsJson([
+ ['name' => 'Nat Manning',
+ 'email' => '[email protected]'
+ ]
+ ]);
}
/*
@@ -102,8 +114,9 @@ class UserCest
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
- 'name' => 'Team RollCall',
- 'email' => '[email protected]',
+ ['name' => 'Team RollCall',
+ 'email' => '[email protected]'
+ ]
]);
}
@@ -120,5 +133,5 @@ class UserCest
$I->sendDelete($this->endpoint."/$id");
$I->seeResponseCodeIs(200);
}
-
+
}
(END)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment