You are here

function FFCTestCase::DSTestHideSourcePages in Field formatter conditions 7

Test Hide source on specific pages on DS.

1 call to FFCTestCase::DSTestHideSourcePages()
FFCTestCase::testDisplaySuite in tests/ffc.test
Tests with Display Suite.

File

tests/ffc.test, line 436
Test file for Field formatter conditions.

Class

FFCTestCase
Group UI tests.

Code

function DSTestHideSourcePages() {

  // Hide fields on specific pages.
  $condition = array(
    'fields[submitted_by][settings_edit_form][settings][conditions][0][condition]' => 'hide_on_pages',
  );
  $configuration = array(
    'fields[submitted_by][settings_edit_form][settings][conditions][0][configuration][pages]' => 'node/1/testing',
    'fields[submitted_by][settings_edit_form][settings][conditions][0][configuration][visibility]' => '1',
  );
  $this
    ->ffcEditFormatterSettings($condition, $configuration, 'edit submitted_by');

  // Verify the post date is on node/1.
  $this
    ->drupalGet('node/' . $this->node1->nid);
  $this
    ->assertRaw(check_plain($this->node1->name));

  // Verify the post date is not on node/1/testing/
  $this
    ->drupalGet('node/' . $this->node1->nid . '/testing');
  $this
    ->assertNoRaw(check_plain($this->node1->name));
}