public function testBlockViewFileContent() { $ctrl = new BlockController('id', Yii::$app); $ctrl->viewFileDoc = ['$this->varValue(\'foo\');', '$this->varValue(\'foo\');', '$this->extraValue(\'foo\');', '$this->cfgValue(\'foo\');']; $view = <<<'EOT' <?php /** * View file for block: MySuperBlock * * File has been created with `block/create` command on LUYA version 1.0.0-dev. * * @param $this->cfgValue('foo'); * @param $this->extraValue('foo'); * @param $this->varValue('foo'); * @param $this->varValue('foo'); * * @var $this \luya\cms\base\PhpBlockView */ ?> EOT; $this->assertSame($view, $ctrl->generateViewFile('MySuperBlock')); }