parent
9977c418d6
commit
053673cb71
2 changed files with 0 additions and 56 deletions
tests/plugins
|
@ -57,44 +57,4 @@ class PluginAddlinkTest extends PHPUnit_Framework_TestCase
|
|||
$this->assertEquals($str, $data[$str]);
|
||||
$this->assertArrayNotHasKey('fields_toolbar', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test render_includes hook while logged in.
|
||||
*/
|
||||
public function testAddlinkIncludesLoggedIn()
|
||||
{
|
||||
$str = 'stuff';
|
||||
$data = array($str => $str);
|
||||
$data['_PAGE_'] = Router::$PAGE_LINKLIST;
|
||||
$data['_LOGGEDIN_'] = true;
|
||||
|
||||
$data = hook_addlink_toolbar_render_includes($data);
|
||||
$this->assertEquals($str, $data[$str]);
|
||||
$this->assertEquals(1, count($data['css_files']));
|
||||
|
||||
$str = 'stuff';
|
||||
$data = array($str => $str);
|
||||
$data['_PAGE_'] = $str;
|
||||
$data['_LOGGEDIN_'] = true;
|
||||
|
||||
$data = hook_addlink_toolbar_render_includes($data);
|
||||
$this->assertEquals($str, $data[$str]);
|
||||
$this->assertArrayNotHasKey('css_files', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test render_includes hook.
|
||||
* Should not affect css files while logged out.
|
||||
*/
|
||||
public function testAddlinkIncludesLoggedOut()
|
||||
{
|
||||
$str = 'stuff';
|
||||
$data = array($str => $str);
|
||||
$data['_PAGE_'] = Router::$PAGE_LINKLIST;
|
||||
$data['_LOGGEDIN_'] = false;
|
||||
|
||||
$data = hook_addlink_toolbar_render_includes($data);
|
||||
$this->assertEquals($str, $data[$str]);
|
||||
$this->assertArrayNotHasKey('css_files', $data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue