Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
fb1cb6f3
Commit
fb1cb6f3
authored
Jun 23, 2012
by
Dries
Browse files
- Patch
#1591710
by swentel, heyrocker, sun: Remove vestiges of block caching from core.
parent
0ccfc7fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/block/config/block.performance.yml
deleted
100644 → 0
View file @
0ccfc7fc
block_cache
:
'
0'
core/modules/system/lib/Drupal/system/Tests/System/BlockTest.php
deleted
100644 → 0
View file @
0ccfc7fc
<?php
/**
* @file
* Definition of Drupal\system\Tests\System\BlockTest.
*/
namespace
Drupal\system\Tests\System
;
use
Drupal\simpletest\WebTestBase
;
class
BlockTest
extends
WebTestBase
{
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Block functionality'
,
'description'
=>
'Configure and move powered-by block.'
,
'group'
=>
'System'
,
);
}
function
setUp
()
{
parent
::
setUp
(
'block'
);
// Create and login user
$admin_user
=
$this
->
drupalCreateUser
(
array
(
'administer blocks'
,
'access administration pages'
));
$this
->
drupalLogin
(
$admin_user
);
}
/**
* Test displaying and hiding the powered-by and help blocks.
*/
function
testSystemBlocks
()
{
// Set block title and some settings to confirm that the interface is available.
$this
->
drupalPost
(
'admin/structure/block/manage/system/powered-by/configure'
,
array
(
'title'
=>
$this
->
randomName
(
8
)),
t
(
'Save block'
));
$this
->
assertText
(
t
(
'The block configuration has been saved.'
),
t
(
'Block configuration set.'
));
// Set the powered-by block to the footer region.
$edit
=
array
();
$edit
[
'blocks[system_powered-by][region]'
]
=
'footer'
;
$edit
[
'blocks[system_main][region]'
]
=
'content'
;
$this
->
drupalPost
(
'admin/structure/block'
,
$edit
,
t
(
'Save blocks'
));
$this
->
assertText
(
t
(
'The block settings have been updated.'
),
t
(
'Block successfully moved to footer region.'
));
// Confirm that the block is being displayed.
$this
->
drupalGet
(
'node'
);
$this
->
assertRaw
(
'id="block-system-powered-by"'
,
t
(
'Block successfully being displayed on the page.'
));
// Set the block to the disabled region.
$edit
=
array
();
$edit
[
'blocks[system_powered-by][region]'
]
=
'-1'
;
$this
->
drupalPost
(
'admin/structure/block'
,
$edit
,
t
(
'Save blocks'
));
// Confirm that the block is hidden.
$this
->
assertNoRaw
(
'id="block-system-powered-by"'
,
t
(
'Block no longer appears on page.'
));
// For convenience of developers, set the block to its default settings.
$edit
=
array
();
$edit
[
'blocks[system_powered-by][region]'
]
=
'footer'
;
$this
->
drupalPost
(
'admin/structure/block'
,
$edit
,
t
(
'Save blocks'
));
$this
->
drupalPost
(
'admin/structure/block/manage/system/powered-by/configure'
,
array
(
'title'
=>
''
),
t
(
'Save block'
));
// Set the help block to the help region.
$edit
=
array
();
$edit
[
'blocks[system_help][region]'
]
=
'help'
;
$this
->
drupalPost
(
'admin/structure/block'
,
$edit
,
t
(
'Save blocks'
));
// Test displaying the help block with block caching enabled.
variable_set
(
'block_cache'
,
TRUE
);
$this
->
drupalGet
(
'admin/structure/block/add'
);
$this
->
assertRaw
(
t
(
'Use this page to create a new custom block.'
));
$this
->
drupalGet
(
'admin/index'
);
$this
->
assertRaw
(
t
(
'This page shows you all available administration tasks for each module.'
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment