public function ConditionAccessResolverTraitTest::providerTestResolveConditions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php \Drupal\Tests\Core\Condition\ConditionAccessResolverTraitTest::providerTestResolveConditions()
File
- core/
tests/ Drupal/ Tests/ Core/ Condition/ ConditionAccessResolverTraitTest.php, line 31 - Contains \Drupal\Tests\Core\Condition\ConditionAccessResolverTraitTest.
Class
- ConditionAccessResolverTraitTest
- @coversDefaultClass \Drupal\Core\Condition\ConditionAccessResolverTrait @group Condition
Namespace
Drupal\Tests\Core\ConditionCode
public function providerTestResolveConditions() {
$data = array();
$condition_true = $this
->getMock('Drupal\\Core\\Condition\\ConditionInterface');
$condition_true
->expects($this
->any())
->method('execute')
->will($this
->returnValue(TRUE));
$condition_false = $this
->getMock('Drupal\\Core\\Condition\\ConditionInterface');
$condition_false
->expects($this
->any())
->method('execute')
->will($this
->returnValue(FALSE));
$condition_exception = $this
->getMock('Drupal\\Core\\Condition\\ConditionInterface');
$condition_exception
->expects($this
->any())
->method('execute')
->will($this
->throwException(new ContextException()));
$conditions = array();
$data[] = array(
$conditions,
'and',
TRUE,
);
$data[] = array(
$conditions,
'or',
FALSE,
);
$conditions = array(
$condition_false,
);
$data[] = array(
$conditions,
'or',
FALSE,
);
$data[] = array(
$conditions,
'and',
FALSE,
);
$conditions = array(
$condition_true,
);
$data[] = array(
$conditions,
'or',
TRUE,
);
$data[] = array(
$conditions,
'and',
TRUE,
);
$conditions = array(
$condition_true,
$condition_false,
);
$data[] = array(
$conditions,
'or',
TRUE,
);
$data[] = array(
$conditions,
'and',
FALSE,
);
$conditions = array(
$condition_exception,
);
$data[] = array(
$conditions,
'or',
FALSE,
);
$data[] = array(
$conditions,
'and',
FALSE,
);
$conditions = array(
$condition_true,
$condition_exception,
);
$data[] = array(
$conditions,
'or',
TRUE,
);
$data[] = array(
$conditions,
'and',
FALSE,
);
$conditions = array(
$condition_exception,
$condition_true,
);
$data[] = array(
$conditions,
'or',
TRUE,
);
$data[] = array(
$conditions,
'and',
FALSE,
);
$conditions = array(
$condition_false,
$condition_exception,
);
$data[] = array(
$conditions,
'or',
FALSE,
);
$data[] = array(
$conditions,
'and',
FALSE,
);
$conditions = array(
$condition_exception,
$condition_false,
);
$data[] = array(
$conditions,
'or',
FALSE,
);
$data[] = array(
$conditions,
'and',
FALSE,
);
return $data;
}