protected function setUp() { $_SERVER['REQUEST_URI'] = 'index.php'; parent::setUp(); $this->controllerSite = \Yii::$app->createControllerByID('site'); $user = new Users(); $user->username = $user->password = '******'; $user->save(); }
protected function setUp() { file_put_contents($this->initAppFileSystem() . '/data/books/filename-3', 'some data'); // db and fs file_put_contents($this->initAppFileSystem() . '/data/books/filename-4', 'some data'); //fs only $this->books = $this->setupFixture('books'); parent::setUp(); //init config controller $this->controller = \Yii::$app->createControllerByID('config'); }
protected function setUp() { $this->books = $this->setupFixture('books'); parent::setUp(); $this->controllerSite = \Yii::$app->createControllerByID('site'); }