コード例 #1
0
ファイル: ShpTest.php プロジェクト: netsensei/core
 public function testDeleteApi()
 {
     // Delete the published definition for each test shp file.
     foreach ($this->test_data as $entry) {
         $name = $entry['name'];
         $this->updateRequest('DELETE');
         $controller = \App::make('Tdt\\Core\\Definitions\\DefinitionController');
         $response = $controller->handle("shp/{$name}");
         $this->assertEquals(200, $response->getStatusCode());
     }
     // Check if everything is deleted properly.
     $definitions_count = \Definition::all()->count();
     $shp_count = \ShpDefinition::all()->count();
     $this->assertTrue($shp_count == 0);
     $this->assertTrue($definitions_count == 0);
 }