コード例 #1
0
ファイル: RestApiTest.php プロジェクト: nrocco/restapi
 public function testCreateNonExistingResource()
 {
     $api = new RestApi($this->database);
     $todo = $api->createResource('todos', ['description' => 'hello world']);
     $this->assertInternalType('array', $todo);
     $this->assertEquals(400, $todo['code']);
     $this->assertInternalType('array', $todo['body']);
     $this->assertEquals('Resource todos does not exist', $todo['body']['message']);
 }