summaryrefslogtreecommitdiff
path: root/modules/system/system.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-06 06:00:05 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-06 06:00:05 +0000
commit90351aa71c1ada304f557b1c82e462670c7b2587 (patch)
treeaaaa113bb17fa6f931b0c91d51812cf731aaa707 /modules/system/system.test
parentf2e3917acbd0b2ed215db7f5f0817d5dab19e692 (diff)
downloadbrdo-90351aa71c1ada304f557b1c82e462670c7b2587.tar.gz
brdo-90351aa71c1ada304f557b1c82e462670c7b2587.tar.bz2
- Patch #748976 by jpmckinney, David_Rothstein: 'Show/hide descriptions' links no longer work.
Diffstat (limited to 'modules/system/system.test')
-rw-r--r--modules/system/system.test39
1 files changed, 38 insertions, 1 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index 55c4083a5..fa33ac3a7 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -1719,7 +1719,7 @@ class ShutdownFunctionsTest extends DrupalWebTestCase {
}
/**
- * Test flood control mechanism clean-up.
+ * Test shutdown functions.
*/
function testShutdownFunctions() {
$arg1 = $this->randomName();
@@ -1729,3 +1729,40 @@ class ShutdownFunctionsTest extends DrupalWebTestCase {
$this->assertText(t('Second shutdown function, arg1 : @arg1, arg2: @arg2', array('@arg1' => $arg1, '@arg2' => $arg2)));
}
}
+
+/**
+ * Functional tests compact mode.
+ */
+class CompactModeTest extends DrupalWebTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => 'Compact mode',
+ 'description' => 'Tests compact mode functionality.',
+ 'group' => 'System',
+ );
+ }
+
+ function setUp() {
+ $admin_user = $this->drupalCreateUser(array('access administration pages'));
+ $this->drupalLogin($admin_user);
+ }
+
+ /**
+ * Test compact mode.
+ */
+ function testCompactMode() {
+ $this->drupalGet('admin/compact/on');
+ $this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], t('Compact mode turns on.'));
+ $this->drupalGet('admin/compact/on');
+ $this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], t('Compact mode remains on after a repeat call.'));
+ $this->drupalGet('');
+ $this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], t('Compact mode persists on new requests.'));
+
+ $this->drupalGet('admin/compact/off');
+ $this->assertEqual($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'deleted', t('Compact mode turns off.'));
+ $this->drupalGet('admin/compact/off');
+ $this->assertEqual($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'deleted', t('Compact mode remains off after a repeat call.'));
+ $this->drupalGet('');
+ $this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], t('Compact mode persists on new requests.'));
+ }
+}