function OrExpressionTest::testEmptyOr

Tests an empty OR.

File

tests/src/Unit/OrExpressionTest.php, line 47

Class

OrExpressionTest
@coversDefaultClass \Drupal\rules\Plugin\RulesExpression\OrExpression @group Rules

Namespace

Drupal\Tests\rules\Unit

Code

public function testEmptyOr() {
    $property = new \ReflectionProperty($this->or, 'conditions');
    $property->setAccessible(TRUE);
    $this->assertEmpty($property->getValue($this->or));
    $this->assertTrue($this->or
        ->execute(), 'Empty OR returns TRUE.');
}