예제 #1
0
 /**
  * (non-PHPdoc)
  * @see yii/CController#filters()
  */
 public function filters()
 {
     return array_merge(array(
         array('SetupFilter'),
         array('SslFilter')
     ), parent::filters());
 }
예제 #2
0
 public function testDefaultProperties()
 {
     $app = new TestApplication();
     $_SERVER['REQUEST_METHOD'] = 'GET';
     $c = new CController('test/subtest');
     $this->assertEquals($c->id, 'test/subtest');
     $this->assertEquals($c->filters(), array());
     $this->assertEquals($c->actions(), array());
     $this->assertNull($c->action);
     $this->assertEquals($c->defaultAction, 'index');
     $this->assertEquals($c->viewPath, $app->viewPath . DIRECTORY_SEPARATOR . 'test/subtest');
     $this->setExpectedException('CHttpException');
     $c->missingAction('index');
 }
예제 #3
0
 public function filters()
 {
     return array_merge(parent::filters(), array('accessControl'));
 }