Author: sb
Date: Tue Jul 31 07:28:02 2007
New Revision: 5759

Log:
- Add tests for nested exclusive choice / simple merge nodes.

Added:
    trunk/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge.dot
    trunk/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge_1.xml
    trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge.log
    trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge2.log
    trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge3.log
Modified:
    trunk/Workflow/tests/case.php
    trunk/Workflow/tests/definition_xml_test.php
    trunk/Workflow/tests/execution_test.php
    trunk/Workflow/tests/visitor_visualization_test.php
    trunk/WorkflowEventLogTiein/tests/listener_test.php

Modified: trunk/Workflow/tests/case.php
==============================================================================
--- trunk/Workflow/tests/case.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/case.php [iso-8859-1] Tue Jul 31 07:28:02 2007
@@ -288,6 +288,81 @@
 
         $this->startNode->addOutNode( $this->branchNode );
         $this->endNode->addInNode( $simpleMerge );
+    }
+
+    protected function setUpNestedExclusiveChoiceSimpleMerge($x = true, $y = 
true)
+    {
+        $this->workflow = new ezcWorkflow( 'NestedExclusiveChoiceSimpleMerge' 
);
+        $this->setUpReferences();
+
+        $setX = new ezcWorkflowNodeVariableSet(
+          array( 'x' => $x )
+        );
+
+        $setY = new ezcWorkflowNodeVariableSet(
+          array( 'y' => $y )
+        );
+
+        $setZ1 = new ezcWorkflowNodeVariableSet(
+          array( 'z' => true )
+        );
+
+        $setZ2 = new ezcWorkflowNodeVariableSet(
+          array( 'z' => false )
+        );
+
+        $setZ3 = new ezcWorkflowNodeVariableSet(
+          array( 'z' => false )
+        );
+
+        $this->startNode->addOutNode( $setX );
+
+        $branch1 = new ezcWorkflowNodeExclusiveChoice;
+        $branch1->addInNode( $setX );
+
+        $branch1->addConditionalOutNode(
+          new ezcWorkflowConditionVariable(
+            'x',
+            new ezcWorkflowConditionIsTrue
+          ),
+          $setY
+        );
+
+        $branch1->addConditionalOutNode(
+          new ezcWorkflowConditionVariable(
+            'x',
+            new ezcWorkflowConditionIsFalse
+          ),
+          $setZ3
+        );
+
+        $branch2 = new ezcWorkflowNodeExclusiveChoice;
+        $branch2->addInNode( $setY );
+
+        $branch2->addConditionalOutNode(
+          new ezcWorkflowConditionVariable(
+            'y',
+            new ezcWorkflowConditionIsTrue
+          ),
+          $setZ1
+        );
+
+        $branch2->addConditionalOutNode(
+          new ezcWorkflowConditionVariable(
+            'y',
+            new ezcWorkflowConditionIsFalse
+          ),
+          $setZ2
+        );
+
+        $nestedMerge = new ezcWorkflowNodeSimpleMerge;
+        $nestedMerge->addInNode( $setZ1 )
+                    ->addInNode( $setZ2 );
+
+        $merge = new ezcWorkflowNodeSimpleMerge;
+        $merge->addInNode( $nestedMerge )
+              ->addInNode( $setZ3 )
+              ->addOutNode( $this->endNode );
     }
 
     protected function setUpMultiChoice( $mergeType )

Added: trunk/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge.dot
==============================================================================
--- trunk/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge.dot (added)
+++ trunk/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge.dot [iso-8859-1] 
Tue Jul 31 07:28:02 2007
@@ -1,0 +1,26 @@
+digraph NestedExclusiveChoiceSimpleMerge {
+node1 [label="Start"]
+node2 [label="x = <true>"]
+node3 [label="Exclusive Choice"]
+node4 [label="y = <true>"]
+node5 [label="Exclusive Choice"]
+node6 [label="z = <true>"]
+node7 [label="Simple Merge"]
+node8 [label="Simple Merge"]
+node9 [label="End"]
+node10 [label="z = <false>"]
+node11 [label="z = <false>"]
+
+node1 -> node2
+node2 -> node3
+node3 -> node4 [label="x is true"]
+node3 -> node11 [label="x is false"]
+node4 -> node5
+node5 -> node6 [label="y is true"]
+node5 -> node10 [label="y is false"]
+node6 -> node7
+node7 -> node8
+node8 -> node9
+node10 -> node7
+node11 -> node8
+}

Added: trunk/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge_1.xml
==============================================================================
--- trunk/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge_1.xml (added)
+++ trunk/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge_1.xml 
[iso-8859-1] Tue Jul 31 07:28:02 2007
@@ -1,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workflow name="NestedExclusiveChoiceSimpleMerge" version="1">
+  <node id="1" type="Start">
+    <outNode id="2"/>
+  </node>
+  <node id="2" type="VariableSet">
+    <variable name="x">
+      <boolean>true</boolean>
+    </variable>
+    <outNode id="3"/>
+  </node>
+  <node id="3" type="ExclusiveChoice">
+    <condition type="Variable" name="x">
+      <condition type="IsTrue"/>
+      <outNode id="4"/>
+    </condition>
+    <condition type="Variable" name="x">
+      <condition type="IsFalse"/>
+      <outNode id="11"/>
+    </condition>
+  </node>
+  <node id="4" type="VariableSet">
+    <variable name="y">
+      <boolean>true</boolean>
+    </variable>
+    <outNode id="5"/>
+  </node>
+  <node id="5" type="ExclusiveChoice">
+    <condition type="Variable" name="y">
+      <condition type="IsTrue"/>
+      <outNode id="6"/>
+    </condition>
+    <condition type="Variable" name="y">
+      <condition type="IsFalse"/>
+      <outNode id="10"/>
+    </condition>
+  </node>
+  <node id="6" type="VariableSet">
+    <variable name="z">
+      <boolean>true</boolean>
+    </variable>
+    <outNode id="7"/>
+  </node>
+  <node id="7" type="SimpleMerge">
+    <outNode id="8"/>
+  </node>
+  <node id="8" type="SimpleMerge">
+    <outNode id="9"/>
+  </node>
+  <node id="9" type="End"/>
+  <node id="10" type="VariableSet">
+    <variable name="z">
+      <boolean>false</boolean>
+    </variable>
+    <outNode id="7"/>
+  </node>
+  <node id="11" type="VariableSet">
+    <variable name="z">
+      <boolean>false</boolean>
+    </variable>
+    <outNode id="8"/>
+  </node>
+</workflow>

Modified: trunk/Workflow/tests/definition_xml_test.php
==============================================================================
--- trunk/Workflow/tests/definition_xml_test.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/definition_xml_test.php [iso-8859-1] Tue Jul 31 
07:28:02 2007
@@ -163,6 +163,17 @@
         );
     }
 
+    public function testSaveNestedExclusiveChoiceSimpleMerge()
+    {
+        $this->setUpNestedExclusiveChoiceSimpleMerge();
+        $this->definition->save( $this->workflow );
+
+        $this->assertEquals(
+          $this->readExpected( 'NestedExclusiveChoiceSimpleMerge' ),
+          $this->readActual( 'NestedExclusiveChoiceSimpleMerge' )
+        );
+    }
+
     public function testSaveWorkflowWithSubWorkflow()
     {
         $this->setUpWorkflowWithSubWorkflow( 'StartEnd' );
@@ -315,6 +326,17 @@
         $this->assertEquals(
           $this->readExpected( 'ExclusiveChoiceSimpleMerge' ),
           $this->readActual( 'ExclusiveChoiceSimpleMerge' )
+        );
+    }
+
+    public function testLoadNestedExclusiveChoiceSimpleMerge()
+    {
+        $this->workflow = $this->definition->loadByName( 
'NestedExclusiveChoiceSimpleMerge' );
+        $this->definition->save( $this->workflow );
+
+        $this->assertEquals(
+          $this->readExpected( 'NestedExclusiveChoiceSimpleMerge' ),
+          $this->readActual( 'NestedExclusiveChoiceSimpleMerge' )
         );
     }
 

Modified: trunk/Workflow/tests/execution_test.php
==============================================================================
--- trunk/Workflow/tests/execution_test.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/execution_test.php [iso-8859-1] Tue Jul 31 07:28:02 
2007
@@ -336,6 +336,50 @@
         $this->assertFalse( $this->execution->isSuspended() );
     }
 
+    public function testExecuteNestedExclusiveChoiceSimpleMerge()
+    {
+        $this->setUpNestedExclusiveChoiceSimpleMerge();
+        $this->execution->workflow = $this->workflow;
+        $this->execution->start();
+
+        $this->assertTrue( $this->execution->hasEnded() );
+        $this->assertFalse( $this->execution->isResumed() );
+        $this->assertFalse( $this->execution->isSuspended() );
+
+        $this->assertTrue( $this->execution->getVariable( 'x' ) );
+        $this->assertTrue( $this->execution->getVariable( 'y' ) );
+        $this->assertTrue( $this->execution->getVariable( 'z' ) );
+    }
+
+    public function testExecuteNestedExclusiveChoiceSimpleMerge2()
+    {
+        $this->setUpNestedExclusiveChoiceSimpleMerge( true, false );
+        $this->execution->workflow = $this->workflow;
+        $this->execution->start();
+
+        $this->assertTrue( $this->execution->hasEnded() );
+        $this->assertFalse( $this->execution->isResumed() );
+        $this->assertFalse( $this->execution->isSuspended() );
+
+        $this->assertTrue( $this->execution->getVariable( 'x' ) );
+        $this->assertFalse( $this->execution->getVariable( 'y' ) );
+        $this->assertFalse( $this->execution->getVariable( 'z' ) );
+    }
+
+    public function testExecuteNestedExclusiveChoiceSimpleMerge3()
+    {
+        $this->setUpNestedExclusiveChoiceSimpleMerge( false );
+        $this->execution->workflow = $this->workflow;
+        $this->execution->start();
+
+        $this->assertTrue( $this->execution->hasEnded() );
+        $this->assertFalse( $this->execution->isResumed() );
+        $this->assertFalse( $this->execution->isSuspended() );
+
+        $this->assertFalse( $this->execution->getVariable( 'x' ) );
+        $this->assertFalse( $this->execution->getVariable( 'z' ) );
+    }
+
     public function testExecuteMultiChoiceSynchronizingMerge()
     {
         $this->setUpMultiChoice( 'SynchronizingMerge' );

Modified: trunk/Workflow/tests/visitor_visualization_test.php
==============================================================================
--- trunk/Workflow/tests/visitor_visualization_test.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/visitor_visualization_test.php [iso-8859-1] Tue Jul 31 
07:28:02 2007
@@ -139,6 +139,17 @@
         );
     }
 
+    public function testVisitNestedExclusiveChoiceSimpleMerge()
+    {
+        $this->setUpNestedExclusiveChoiceSimpleMerge();
+        $this->workflow->accept( $this->visitor );
+
+        $this->assertEquals(
+          $this->readExpected( 'NestedExclusiveChoiceSimpleMerge' ),
+          (string)$this->visitor
+        );
+    }
+
     public function testVisitMultiChoiceSynchronizingMerge()
     {
         $this->setUpMultiChoice( 'SynchronizingMerge' );

Added: 
trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge.log
==============================================================================
--- trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge.log 
(added)
+++ trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge.log 
[iso-8859-1] Tue Jul 31 07:28:02 2007
@@ -1,0 +1,29 @@
+MMM DD HH:MM:SS [Info] [default] [default] Started execution #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#1(ezcWorkflowNodeStart) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Started thread #0 (1 sibling(s)) 
for execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#2(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#1(ezcWorkflowNodeStart) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Set variable "x" to "<true>" for 
execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#3(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#2(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Started thread #1 (1 sibling(s)) 
for execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#4(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#3(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Set variable "y" to "<true>" for 
execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#5(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#4(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Started thread #2 (parent: 1, 1 
sibling(s)) for execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" 
(version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#6(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#5(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Set variable "z" to "<true>" for 
execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#7(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#6(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Ended thread #2 for execution #1 
of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#8(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#7(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Ended thread #1 for execution #1 
of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#9(ezcWorkflowNodeEnd) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#8(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#9(ezcWorkflowNodeEnd) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Ended thread #0 for execution #1 
of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Info] [default] [default] Ended execution #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).

Added: 
trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge2.log
==============================================================================
--- 
trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge2.log 
(added)
+++ 
trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge2.log 
[iso-8859-1] Tue Jul 31 07:28:02 2007
@@ -1,0 +1,29 @@
+MMM DD HH:MM:SS [Info] [default] [default] Started execution #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#1(ezcWorkflowNodeStart) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Started thread #0 (1 sibling(s)) 
for execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#2(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#1(ezcWorkflowNodeStart) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Set variable "x" to "<true>" for 
execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#3(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#2(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Started thread #1 (1 sibling(s)) 
for execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#4(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#3(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Set variable "y" to "<false>" for 
execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#5(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#4(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Started thread #2 (parent: 1, 1 
sibling(s)) for execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" 
(version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#10(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#5(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Set variable "z" to "<false>" for 
execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#7(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#10(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Ended thread #2 for execution #1 
of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#8(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#7(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Ended thread #1 for execution #1 
of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#9(ezcWorkflowNodeEnd) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#8(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#9(ezcWorkflowNodeEnd) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Ended thread #0 for execution #1 
of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Info] [default] [default] Ended execution #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).

Added: 
trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge3.log
==============================================================================
--- 
trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge3.log 
(added)
+++ 
trunk/WorkflowEventLogTiein/tests/data/NestedExclusiveChoiceSimpleMerge3.log 
[iso-8859-1] Tue Jul 31 07:28:02 2007
@@ -1,0 +1,20 @@
+MMM DD HH:MM:SS [Info] [default] [default] Started execution #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#1(ezcWorkflowNodeStart) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Started thread #0 (1 sibling(s)) 
for execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#2(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#1(ezcWorkflowNodeStart) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Set variable "x" to "<false>" for 
execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#3(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#2(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Started thread #1 (1 sibling(s)) 
for execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#11(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#3(ezcWorkflowNodeExclusiveChoice) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Set variable "z" to "<false>" for 
execution #1 of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#8(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#11(ezcWorkflowNodeVariableSet) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Ended thread #1 for execution #1 
of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Activated node 
#9(ezcWorkflowNodeEnd) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#8(ezcWorkflowNodeSimpleMerge) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Executed node 
#9(ezcWorkflowNodeEnd) for instance #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Debug] [default] [default] Ended thread #0 for execution #1 
of workflow "NestedExclusiveChoiceSimpleMerge" (version 1).
+MMM DD HH:MM:SS [Info] [default] [default] Ended execution #1 of workflow 
"NestedExclusiveChoiceSimpleMerge" (version 1).

Modified: trunk/WorkflowEventLogTiein/tests/listener_test.php
==============================================================================
--- trunk/WorkflowEventLogTiein/tests/listener_test.php [iso-8859-1] (original)
+++ trunk/WorkflowEventLogTiein/tests/listener_test.php [iso-8859-1] Tue Jul 31 
07:28:02 2007
@@ -172,6 +172,45 @@
         );
     }
 
+    public function testLogNestedExclusiveChoiceSimpleMerge()
+    {
+        $this->setUpNestedExclusiveChoiceSimpleMerge();
+        $this->definition->save( $this->workflow );
+        $this->execution->workflow = $this->workflow;
+        $this->execution->start();
+
+        $this->assertEquals(
+          $this->readExpected( 'NestedExclusiveChoiceSimpleMerge' ),
+          $this->readActual()
+        );
+    }
+
+    public function testLogNestedExclusiveChoiceSimpleMerge2()
+    {
+        $this->setUpNestedExclusiveChoiceSimpleMerge( true, false );
+        $this->definition->save( $this->workflow );
+        $this->execution->workflow = $this->workflow;
+        $this->execution->start();
+
+        $this->assertEquals(
+          $this->readExpected( 'NestedExclusiveChoiceSimpleMerge2' ),
+          $this->readActual()
+        );
+    }
+
+    public function testLogNestedExclusiveChoiceSimpleMerge3()
+    {
+        $this->setUpNestedExclusiveChoiceSimpleMerge( false );
+        $this->definition->save( $this->workflow );
+        $this->execution->workflow = $this->workflow;
+        $this->execution->start();
+
+        $this->assertEquals(
+          $this->readExpected( 'NestedExclusiveChoiceSimpleMerge3' ),
+          $this->readActual()
+        );
+    }
+
     public function testLogMultiChoiceSynchronizingMerge()
     {
         $this->setUpMultiChoice( 'SynchronizingMerge' );


-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to