function FFCTestCase::CoreTestHideSourcePages in Field formatter conditions 7
Test Hide source on specific pages on Core.
1 call to FFCTestCase::CoreTestHideSourcePages()
- FFCTestCase::testVannillaCore in tests/
ffc.test - Test Vannilla Core.
File
- tests/
ffc.test, line 329 - Test file for Field formatter conditions.
Class
- FFCTestCase
- Group UI tests.
Code
function CoreTestHideSourcePages() {
// Hide fields on specific pages.
$condition = array(
'fields[body][settings_edit_form][settings][conditions][0][condition]' => 'hide_on_pages',
);
$configuration = array(
'fields[body][settings_edit_form][settings][conditions][0][configuration][pages]' => 'node/1/testing',
'fields[body][settings_edit_form][settings][conditions][0][configuration][visibility]' => '1',
);
$this
->ffcEditFormatterSettings($condition, $configuration);
// Verify the body is on node/1.
$this
->drupalGet('node/' . $this->node1->nid);
$this
->assertText($this->node1->body[$this->node1->language][0]['value']);
// Verify the body is not on node/1/testing.
$this
->drupalGet('node/' . $this->node1->nid . '/testing');
$this
->assertNoText($this->node1->body[$this->node1->language][0]['value']);
}