[ticket/289] Move store_selected_forums to modules_helper
This commit is contained in:
@@ -14,6 +14,8 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
|
||||
|
||||
protected $modules;
|
||||
|
||||
protected $config;
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/auth.xml');
|
||||
@@ -24,9 +26,10 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
|
||||
parent::setUp();
|
||||
|
||||
$auth = new \phpbb\auth\auth();
|
||||
$config = new \phpbb\config\config(array());
|
||||
$this->config = new \phpbb\config\config(array());
|
||||
$request = new \phpbb_mock_request(array('foo' => array('bar')));
|
||||
|
||||
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $config);
|
||||
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $request);
|
||||
}
|
||||
|
||||
public function data_get_disallowed_forums()
|
||||
@@ -92,4 +95,11 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
|
||||
$this->modules_helper->generate_forum_select('foo', 'bar')
|
||||
);
|
||||
}
|
||||
|
||||
public function test_store_selected_forums()
|
||||
{
|
||||
$this->assertEmpty($this->config['foo']);
|
||||
$this->modules_helper->store_selected_forums('foo');
|
||||
$this->assertEquals('bar', $this->config['foo']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user