[ticket/216] Use get_move_module_data() for acquiring module data for moving

This will get rid of a query code that was duplicated over 4 methods in
portal_module.

B3P-216
This commit is contained in:
Marc Alexander
2014-02-09 16:23:46 +01:00
parent cc098fb66c
commit 2909976697
2 changed files with 32 additions and 24 deletions

View File

@@ -49,6 +49,16 @@ class phpbb_acp_move_module_test extends \board3\portal\tests\testframework\data
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/modules.xml');
}
public function test_get_move_module_data()
{
$module_data = $this->portal_module->get_move_module_data(1);
$this->assertEquals(array(
'module_order' => 1,
'module_column' => 2,
'module_classname' => '\board3\portal\modules\clock',
), $module_data);
}
public function test_move_module_up()
{
self::$redirected = false;