initOutput(rcmail_action::MODE_HTTP, 'settings', 'preferences'); $this->assertInstanceOf('rcmail_action', $action); $this->assertTrue($action->checks()); $action->run(); $result = $output->getOutput(); $this->assertSame('Preferences', $output->getProperty('pagetitle')); } /** * Test sections_list() method */ function test_sections_list() { $result = rcmail_action_settings_index::sections_list([]); $this->assertTrue(strpos($result, '') === 0); } /** * Test user_prefs() method */ function test_user_prefs() { $result = rcmail_action_settings_index::user_prefs('general'); $this->assertSame('general', $result[0]['general']['id']); } /** * Test get_skins() method */ function test_get_skins() { $result = rcmail_action_settings_index::get_skins(); sort($result); $this->assertSame(['classic', 'elastic', 'larry'], $result); } /** * Test settings_tabs() method */ function test_settings_tabs() { $result = rcmail_action_settings_index::settings_tabs([]); $this->assertTrue(strpos($result, 'assertSame('Europe/Warsaw', $result); } /** * Test timezone_standard_time_label() method */ function test_timezone_standard_time_data() { $result = rcmail_action_settings_index::timezone_standard_time_data('UTC'); $this->assertSame('+00:00', $result['offset']); } /** * Test attach_images() method */ function test_attach_images() { $result = rcmail_action_settings_index::attach_images('

test

', 'identity'); // TODO: test image replacement $this->assertSame('

test

', $result); } /** * Test wash_html() method */ function test_wash_html() { $result = rcmail_action_settings_index::wash_html('

test

'); $this->assertSame('

test

', $result); } }