'Go to closet', 'link' => '/user/closet', 'icon' => 'fa-book' ]); $this->actAs('normal') ->get('/user') ->assertSee('Go to closet') ->assertSee('/user/closet') ->assertSee('fa-book'); } public function testRegisterPluginTransScripts() { Hook::registerPluginTransScripts('example-plugin'); $this->get('/') ->assertSee('example-plugin/lang/en/locale.js'); } public function testAddStyleFileToPage() { Hook::addStyleFileToPage('/style/all'); $this->get('/') ->assertSee(''); Hook::addStyleFileToPage('/style/pattern', ['skinlib']); $this->get('/') ->assertDontSee(''); $this->get('/skinlib') ->assertSee(''); } public function testAddScriptFileToPage() { Hook::addScriptFileToPage('/script/all'); $this->get('/') ->assertSee(''); Hook::addScriptFileToPage('/script/pattern', ['skinlib']); $this->get('/') ->assertDontSee(''); $this->get('/skinlib') ->assertSee(''); } }