コード例 #1
0
ファイル: BeforeFilterTest.php プロジェクト: letsdrink/ouzo
 /**
  * @test
  */
 public function shouldInvokeActionWhenBeforeFilterReturnsTrue()
 {
     //given
     SampleController::$beforeActionResult = true;
     SampleController::$actionCalled = false;
     Route::any('/sample/action', 'sample#action');
     //when
     $this->get('/sample/action');
     //then
     $this->assertTrue(SampleController::$actionCalled);
 }