put() 공개 정적인 메소드

public static put ( $uri, $action, array $options = [] )
$options array
예제 #1
0
 /**
  * @test
  */
 public function shouldFindRouteRulePut()
 {
     //given
     Route::put('/user/index', 'user#index');
     $router = $this->_createRouter('PUT', '/user/index');
     //when
     $rule = $router->findRoute();
     //then
     $this->assertEquals('/user/index', $rule->getUri());
     $this->assertEquals('PUT', $rule->getMethod());
     $this->assertEquals('user', $rule->getController());
     $this->assertEquals('index', $rule->getAction());
 }
예제 #2
0
 /**
  * @test
  */
 public function shouldAddPutRoute()
 {
     //given
     Route::put('/users/save', 'users#save');
     //when
     $routes = Route::getRoutes();
     //then
     $this->assertEquals('users', $routes[0]->getController());
     $this->assertEquals('save', $routes[0]->getAction());
 }