renderFrontend() public method

Render the frontend template.
public renderFrontend ( array $folders, string $name, string $ns ) : string
$folders array
$name string
$ns string
return string
Example #1
0
    public function testRenderFrontend()
    {
        $ctrl = new ModuleController('module', Yii::$app);
        $content = $ctrl->renderFrontend([], 'foo', 'app\\modules');
        $tpl = <<<'EOT'
<?php

namespace app\modules\frontend;

/**
 * Foo Admin Module.
 *
 * File has been created with `module/create` command on LUYA version 1.0.0-dev. 
 */
class Module extends \luya\base\Module
{

}
EOT;
        $this->assertSame($tpl, $content);
    }