コード例 #1
0
ファイル: RuleTest.php プロジェクト: Progressable/openway8
 /**
  * Tests that a nested expression can be retrieved by UUID.
  */
 public function testLookupExpression()
 {
     // Test Conditions.
     $this->rule->addExpressionObject($this->trueConditionExpression->reveal());
     $uuid = $this->trueConditionExpression->reveal()->getUuid();
     $this->assertSame($this->trueConditionExpression->reveal(), $this->rule->getExpression($uuid));
     // Test actions.
     $this->rule->addExpressionObject($this->testActionExpression->reveal());
     $uuid = $this->testActionExpression->reveal()->getUuid();
     $this->assertSame($this->testActionExpression->reveal(), $this->rule->getExpression($uuid));
     $this->assertFalse($this->rule->getExpression('invalid UUID'));
 }