Skip to content

Commit

Permalink
Added tests for condition variables that are order dependant
Browse files Browse the repository at this point in the history
  • Loading branch information
rrehbein committed May 31, 2012
1 parent c575f14 commit 94440c3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/condition_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,28 @@ public function testVariables3()
$this->assertFalse( $condition->evaluate( array() ) );
}

public function testVariables4()
{
$condition = new ezcWorkflowConditionVariables(
'foo',
'bar',
new ezcWorkflowConditionIsGreaterThan
);

$this->assertFalse( $condition->evaluate( array('foo' => 2, 'bar' => 5) ) , 'Failed condition: ' . $condition);
}

public function testVariables5()
{
$condition = new ezcWorkflowConditionVariables(
'foo',
'bar',
new ezcWorkflowConditionIsGreaterThan
);

$this->assertTrue( $condition->evaluate( array('foo' => 8, 'bar' => 5) ) , 'Failed condition: ' . $condition);
}

public function testAnd()
{
$true = new ezcWorkflowConditionIsTrue;
Expand Down

0 comments on commit 94440c3

Please sign in to comment.