diff options
Diffstat (limited to 'modules/block/block.test')
-rw-r--r-- | modules/block/block.test | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/modules/block/block.test b/modules/block/block.test index 30f54f052..94e0d6e1d 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -20,7 +20,7 @@ class BlockTestCase extends DrupalWebTestCase { parent::setUp(); // Create and login user - $admin_user = $this->drupalCreateUser(array('administer blocks')); + $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer filters')); $this->drupalLogin($admin_user); } @@ -61,6 +61,28 @@ class BlockTestCase extends DrupalWebTestCase { } /** + * Test creating custom block (i.e. box) using Full HTML. + */ + function testBoxFormat() { + // Add a new box by filling out the input form on the admin/build/block/add page. + $box = array(); + $box['info'] = $this->randomName(8); + $box['title'] = $this->randomName(8); + $box['body'] = '<h1>Full HTML</h1>'; + $box['body_format'] = 2; + $this->drupalPost('admin/build/block/add', $box, t('Save block')); + + // Set the created box to a specific region. + $bid = db_result(db_query("SELECT bid FROM {boxes} WHERE info = '%s'", array($box['info']))); + $edit = array(); + $edit['block_' . $bid . '[region]'] = 'left'; + $this->drupalPost('admin/build/block', $edit, t('Save blocks')); + + // Confirm that the box is being displayed using configured input format. + $this->assertRaw('<h1>Full HTML</h1>', t('Box successfully being displayed using Full HTML.')); + } + + /** * Test configuring and moving a module-define block to specific regions. */ function testBlock() { |