ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
WorkflowStepTest Class Reference
+ Inheritance diagram for WorkflowStepTest:
+ Collaboration diagram for WorkflowStepTest:

Public Member Functions

 setUp ()
 
 test_implements_factory_interface ()
 
 test_constructor_params ()
 
 test_withStatus ()
 
 test_withStatus_wrong_args ()
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null)
 
 normalizeHTML ($html)
 
 assertHTMLEquals ($expected_html_as_string, $html_as_string)
 

Protected Member Functions

 buildFactory ()
 

Detailed Description

Definition at line 10 of file WorkflowStepTest.php.

Member Function Documentation

◆ buildFactory()

WorkflowStepTest::buildFactory ( )
protected

Definition at line 12 of file WorkflowStepTest.php.

Referenced by setUp().

+ Here is the caller graph for this function:

◆ setUp()

WorkflowStepTest::setUp ( )

Definition at line 16 of file WorkflowStepTest.php.

References buildFactory().

17  {
18  $this->f = $this->buildFactory();
19  }
+ Here is the call graph for this function:

◆ test_constructor_params()

WorkflowStepTest::test_constructor_params ( )

Definition at line 27 of file WorkflowStepTest.php.

References $description, and $step.

28  {
29  $label = 'label';
30  $description = 'description';
31  $step = $this->f->step($label, $description);
32  $this->assertEquals($label, $step->getLabel());
33  $this->assertEquals($description, $step->getDescription());
34  $this->assertEquals(Workflow\Step::NOT_STARTED, $step->getStatus());
35  }
foreach( $_REQUEST as $var) foreach(array('_POST'=> 'HTTP_POST_VARS', '_GET'=> 'HTTP_GET_VARS', '_COOKIE'=> 'HTTP_COOKIE_VARS', '_SERVER'=> 'HTTP_SERVER_VARS', '_ENV'=> 'HTTP_ENV_VARS', '_FILES'=> 'HTTP_POST_FILES') as $array=> $other) $step
Definition: cssgen.php:155

◆ test_implements_factory_interface()

WorkflowStepTest::test_implements_factory_interface ( )

Definition at line 21 of file WorkflowStepTest.php.

References $step.

22  {
23  $step = $this->f->step('', '');
24  $this->assertInstanceOf(Workflow\Step::class, $step);
25  }
foreach( $_REQUEST as $var) foreach(array('_POST'=> 'HTTP_POST_VARS', '_GET'=> 'HTTP_GET_VARS', '_COOKIE'=> 'HTTP_COOKIE_VARS', '_SERVER'=> 'HTTP_SERVER_VARS', '_ENV'=> 'HTTP_ENV_VARS', '_FILES'=> 'HTTP_POST_FILES') as $array=> $other) $step
Definition: cssgen.php:155

◆ test_withStatus()

WorkflowStepTest::test_withStatus ( )

Definition at line 37 of file WorkflowStepTest.php.

References $step.

38  {
39  $status = Workflow\Step::SUCCESSFULLY;
40  $step = $this->f->step('', '')->withStatus($status);
41  $this->assertEquals($status, $step->getStatus());
42  }
foreach( $_REQUEST as $var) foreach(array('_POST'=> 'HTTP_POST_VARS', '_GET'=> 'HTTP_GET_VARS', '_COOKIE'=> 'HTTP_COOKIE_VARS', '_SERVER'=> 'HTTP_SERVER_VARS', '_ENV'=> 'HTTP_ENV_VARS', '_FILES'=> 'HTTP_POST_FILES') as $array=> $other) $step
Definition: cssgen.php:155

◆ test_withStatus_wrong_args()

WorkflowStepTest::test_withStatus_wrong_args ( )

Definition at line 44 of file WorkflowStepTest.php.

References $step.

45  {
46  $status = 100;
47  $raised = false;
48  try {
49  $step = $this->f->step('', '')->withStatus($status);
50  } catch (\InvalidArgumentException $e) {
51  $raised = true;
52  }
53  $this->assertTrue($raised);
54  }
foreach( $_REQUEST as $var) foreach(array('_POST'=> 'HTTP_POST_VARS', '_GET'=> 'HTTP_GET_VARS', '_COOKIE'=> 'HTTP_COOKIE_VARS', '_SERVER'=> 'HTTP_SERVER_VARS', '_ENV'=> 'HTTP_ENV_VARS', '_FILES'=> 'HTTP_POST_FILES') as $array=> $other) $step
Definition: cssgen.php:155

The documentation for this class was generated from the following file: