You are here

public function SchedulerFunctionalTest::dataNonEnabledType in Scheduler 7

Provides data for testNonEnabledType().

Return value

array Each item in the test data array has the follow elements: id - (in) a sequential id for use in node titles description - (string) describing the scenario being checked publishing_enabled - (bool) whether publishing is enabled unpublishing_enabled - (bool) whether unpublishing is enabled

1 call to SchedulerFunctionalTest::dataNonEnabledType()
SchedulerFunctionalTest::testNonEnabledType in tests/scheduler.test
Test that Scheduler does not interfere with non-scheduler-enabled nodes.

File

tests/scheduler.test, line 696
Scheduler module test case file.

Class

SchedulerFunctionalTest
Tests the scheduler interface.

Code

public function dataNonEnabledType() {
  $data = array(
    // By default check that the scheduler date fields are not displayed.
    0 => array(
      0,
      'Default',
      FALSE,
      FALSE,
    ),
    // Explicitly disable this content type for both settings.
    1 => array(
      1,
      'Disabling both settings',
      FALSE,
      FALSE,
    ),
    // Turn on scheduled publishing only.
    2 => array(
      2,
      'Enabling publishing only',
      TRUE,
      FALSE,
    ),
    // Turn on scheduled unpublishing only.
    3 => array(
      3,
      'Enabling unpublishing only',
      FALSE,
      TRUE,
    ),
    // For completeness turn on bothbscheduled publishing and unpublishing.
    4 => array(
      4,
      'Enabling both publishing and unpublishing',
      TRUE,
      TRUE,
    ),
  );

  // Use unset($data[n]) to remove a temporarily unwanted item, use
  // return array($data[n]) to selectively test just one item, or have the
  // default return $data to test everything.
  return $data;
}