Example #1
0
 public function testMemberAndCollection()
 {
     $this->router->resources('parent', 'parents')->only('index')->member('foo', 'GET')->collection('cfoo', 'PUT');
     $this->router->resource('singular')->only('show')->collection('sing_foo', 'DELETE');
     $this->checkGeneratedResources(['parents' => ['GET'], 'parents/{id}/foo' => ['GET'], 'parents/cfoo' => ['PUT'], 'singular' => ['GET'], 'singular/sing_foo' => ['DELETE']], ['parents_url' => 'parents', 'cfoo_parent_url' => 'parents/cfoo', 'foo_parent_url' => 'parents/{id}/foo', 'singular_url' => 'singular', 'sing_foo_singular_url' => 'singular/sing_foo']);
 }