private function PatternsContentTypeTestCase::testDelete in Patterns 7
Same name and namespace in other branches
- 7.2 tests/node/content.test \PatternsContentTypeTestCase::testDelete()
1 call to PatternsContentTypeTestCase::testDelete()
File
- tests/
node/ content.test, line 66 - SimpleTests for the Node component of Patterns (Content Types).
Class
- PatternsContentTypeTestCase
- @file SimpleTests for the Node component of Patterns (Content Types).
Code
private function testDelete() {
// Run the pattern.
parent::runFile('content_delete.yaml', 'Content Type (delete)', $this->node_tests_dir);
// Expected messages.
$this
->assertUniqueText(t('The content type Test Content Type2 has been deleted.'));
// The content type should exist at this point.
$node_type_count = db_select('node_type', 'n')
->fields('n', array(
'type',
))
->condition('type', 'test_content_type')
->countQuery()
->execute()
->fetchField();
$this
->assertIdentical($node_type_count, '0', t('The content type should not exist at this point.'));
}