function ConfigEntityQueryTest::testCaseSensitivity

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::testCaseSensitivity()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::testCaseSensitivity()
  3. 10 core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityQueryTest::testCaseSensitivity()

Tests case sensitivity.

File

core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php, line 691

Class

ConfigEntityQueryTest
Tests Config Entity Query functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testCaseSensitivity() : void {
    // Filter by label with a known containing case-sensitive word.
    $this->queryResults = $this->entityStorage
        ->getQuery()
        ->condition('label', 'TEST', 'CONTAINS')
        ->execute();
    $this->assertResults([
        '3',
        '4',
        '5',
    ]);
    $this->queryResults = $this->entityStorage
        ->getQuery()
        ->condition('label', 'test', 'CONTAINS')
        ->execute();
    $this->assertResults([
        '3',
        '4',
        '5',
    ]);
}

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