コード例 #1
1
ファイル: RestTest.php プロジェクト: hitechdk/Codeception
 public function testJsonTypeMatchesWithJsonPath()
 {
     $this->module->response = '{"users": [{ "name": "davert"}, {"id": 1}]}';
     $this->module->seeResponseMatchesJsonType(['name' => 'string'], '$.users[0]');
     $this->module->seeResponseMatchesJsonType(['id' => 'integer'], '$.users[1]');
     $this->module->dontSeeResponseMatchesJsonType(['id' => 'integer'], '$.users[0]');
 }