You are here

public function ConfigEntityQueryTest::testCaseSensitivity in Drupal 9

Same name and namespace in other branches
  1. 8 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 653

Class

ConfigEntityQueryTest
Tests Config Entity Query functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testCaseSensitivity() {

  // 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',
  ]);
}