function SelectTest::testNonArrayOperatorWithArrayValueConditionDeprecated

Tests thrown exception for non array operator conditions with array value.

@dataProvider providerNonArrayOperatorWithArrayValueCondition @group legacy

File

core/tests/Drupal/KernelTests/Core/Database/SelectTest.php, line 638

Class

SelectTest
Tests the Select query builder.

Namespace

Drupal\KernelTests\Core\Database

Code

public function testNonArrayOperatorWithArrayValueConditionDeprecated($operator, $operator_in_exception_message) : void {
    $this->expectDeprecation('Calling Drupal\\Core\\Database\\Query\\Condition::condition() without an array compatible operator is deprecated in drupal:10.1.0 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3350985');
    $this->connection
        ->select('test', 't')
        ->fields('t')
        ->condition('age', [
        26,
    ], $operator)
        ->execute();
}

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