You are here

public function ClosureExpressionVisitorTest::testWalkNotInComparison in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php \Doctrine\Tests\Common\Collections\ClosureExpressionVisitorTest::testWalkNotInComparison()

File

vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php, line 120

Class

ClosureExpressionVisitorTest
@group DDC-1637

Namespace

Doctrine\Tests\Common\Collections

Code

public function testWalkNotInComparison() {
  $closure = $this->visitor
    ->walkComparison($this->builder
    ->notIn("foo", array(
    1,
    2,
    3,
  )));
  $this
    ->assertFalse($closure(new TestObject(1)));
  $this
    ->assertFalse($closure(new TestObject(2)));
  $this
    ->assertTrue($closure(new TestObject(0)));
  $this
    ->assertTrue($closure(new TestObject(4)));
}