private function PatternsNodeTestCase::testModify in Patterns 7
Same name and namespace in other branches
- 7.2 tests/node/node.test \PatternsNodeTestCase::testModify()
1 call to PatternsNodeTestCase::testModify()
- PatternsNodeTestCase::testCreateModifyDelete in tests/
node/ node.test
File
- tests/
node/ node.test, line 77 - SimpleTests for the Node component of Patterns (Node).
Class
- PatternsNodeTestCase
- @file SimpleTests for the Node component of Patterns (Node).
Code
private function testModify() {
// Run the pattern.
parent::runFile('node_modify.yaml', 'Node (modify)', $this->node_tests_dir);
// Expected messages.
$this
->assertText(t('Article Test Article2 has been updated.'));
// The node should exist with the right values.
$node_count = db_select('node', 'n')
->fields('n', array(
'nid',
))
->condition('type', 'article')
->condition('title', 'Test Article2')
->countQuery()
->execute()
->fetchField();
$this
->assertIdentical($node_count, '1', t('The node should exist at this point.'));
}