private function PatternsBlockTestCase::testDelete in Patterns 7.2
Same name and namespace in other branches
- 7 tests/block/block.test \PatternsBlockTestCase::testDelete()
1 call to PatternsBlockTestCase::testDelete()
- PatternsBlockTestCase::testCreateModifyDelete in tests/
block/ block.test
File
- tests/
block/ block.test, line 88 - SimpleTests for the Block component of Patterns.
Class
- PatternsBlockTestCase
- @file SimpleTests for the Block component of Patterns.
Code
private function testDelete() {
// Run the pattern.
parent::runFile('block_delete.yaml', 'Blocks (custom) delete', $this->block_tests_dir);
//IMPORTANT: the delta values might need to be changed in both (pattern and test) if there
//were already some custom blocks. We keep 1 since is the default value for a clean installation
// Expected messages. Removing the delta since this might need to be changed
$this
->assertText('Removed all the configuration for custom block delta');
// The block should not exist at this point.
$block_count = db_select('block', 'b')
->fields('b', array(
'bid',
))
->condition('module', 'block')
->condition('title', 'Test title')
->countQuery()
->execute()
->fetchField();
$this
->assertIdentical($block_count, '0', t('The custom block should not exist at this point.'));
}