protected function ConditionTest::mockCondition in Apigee Edge 8
Creates a Condition object with a mock query parameter.
Parameters
string $conjunction: The operator to use to combine conditions: 'AND' or 'OR'.
Return value
\Drupal\apigee_edge\Entity\Query\Condition Mock conditional object.
7 calls to ConditionTest::mockCondition()
- ConditionTest::testAnd in tests/
src/ Unit/ ConditionTest.php - Tests the "AND" conjunction.
- ConditionTest::testBool in tests/
src/ Unit/ ConditionTest.php - Tests a boolean condition.
- ConditionTest::testComplex in tests/
src/ Unit/ ConditionTest.php - Tests a complex condition.
- ConditionTest::testEmptyCondition in tests/
src/ Unit/ ConditionTest.php - Tests an empty condition (every result will be returned).
- ConditionTest::testIn in tests/
src/ Unit/ ConditionTest.php - Tests an array contains ("IN" keyword in SQL) condition.
File
- tests/
src/ Unit/ ConditionTest.php, line 188
Class
- ConditionTest
- Entity query condition tests.
Namespace
Drupal\Tests\apigee_edge\UnitCode
protected function mockCondition($conjunction = 'AND') : Condition {
return new Condition($conjunction, new class implements QueryInterface {
/**
* {@inheritdoc}
*/
public function addTag($tag) {
}
/**
* {@inheritdoc}
*/
public function hasTag($tag) {
}
/**
* {@inheritdoc}
*/
public function hasAllTags() {
}
/**
* {@inheritdoc}
*/
public function hasAnyTag() {
}
/**
* {@inheritdoc}
*/
public function addMetaData($key, $object) {
}
/**
* {@inheritdoc}
*/
public function getMetaData($key) {
}
/**
* {@inheritdoc}
*/
public function getEntityTypeId() {
}
/**
* {@inheritdoc}
*/
public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL) {
}
/**
* {@inheritdoc}
*/
public function exists($field, $langcode = NULL) {
}
/**
* {@inheritdoc}
*/
public function notExists($field, $langcode = NULL) {
}
/**
* {@inheritdoc}
*/
public function pager($limit = 10, $element = NULL) {
}
/**
* {@inheritdoc}
*/
public function range($start = NULL, $length = NULL) {
}
/**
* {@inheritdoc}
*/
public function sort($field, $direction = 'ASC', $langcode = NULL) {
}
/**
* {@inheritdoc}
*/
public function count() {
}
/**
* {@inheritdoc}
*/
public function tableSort(&$headers) {
}
/**
* {@inheritdoc}
*/
public function accessCheck($access_check = TRUE) {
}
/**
* {@inheritdoc}
*/
public function execute() {
}
/**
* {@inheritdoc}
*/
public function andConditionGroup() {
}
/**
* {@inheritdoc}
*/
public function orConditionGroup() {
}
/**
* {@inheritdoc}
*/
public function currentRevision() {
}
/**
* {@inheritdoc}
*/
public function allRevisions() {
}
/**
* {@inheritdoc}
*/
public function latestRevision() {
}
});
}