function FieldBooleanTest::dataSet

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php \Drupal\Tests\views\Kernel\Handler\FieldBooleanTest::dataSet()
  2. 8.9.x core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php \Drupal\Tests\views\Kernel\Handler\FieldBooleanTest::dataSet()
  3. 10 core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php \Drupal\Tests\views\Kernel\Handler\FieldBooleanTest::dataSet()

Overrides ViewsKernelTestBase::dataSet

File

core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php, line 24

Class

FieldBooleanTest
Tests the core <a href="/api/drupal/core%21modules%21views%21src%21Plugin%21views%21field%21Boolean.php/class/Boolean/11.x" title="A handler to provide proper displays for booleans." class="local">Drupal\views\Plugin\views\field\Boolean</a> handler.

Namespace

Drupal\Tests\views\Kernel\Handler

Code

public function dataSet() {
    // Use default dataset but remove the age from john and paul
    $data = parent::dataSet();
    $data[0]['age'] = 0;
    $data[3]['age'] = 0;
    return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.