function ConditionTest::providerSimpleCondition

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Database/ConditionTest.php \Drupal\Tests\Core\Database\ConditionTest::providerSimpleCondition()
  2. 10 core/tests/Drupal/Tests/Core/Database/ConditionTest.php \Drupal\Tests\Core\Database\ConditionTest::providerSimpleCondition()
  3. 11.x core/tests/Drupal/Tests/Core/Database/ConditionTest.php \Drupal\Tests\Core\Database\ConditionTest::providerSimpleCondition()

Provides a list of known operations and the expected output.

Return value

array

  • Expected result for the string version of the condition.
  • The field name to input in the condition.

File

core/tests/Drupal/Tests/Core/Database/ConditionTest.php, line 27

Class

ConditionTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Database%21Query%21Condition.php/class/Condition/9" title="Generic class for a series of conditions in a query." class="local">\Drupal\Core\Database\Query\Condition</a>

Namespace

Drupal\Tests\Core\Database

Code

public function providerSimpleCondition() {
    return [
        [
            'name = :db_condition_placeholder_0',
            'name',
        ],
        [
            'name123 = :db_condition_placeholder_0',
            'name-123',
        ],
    ];
}

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