ILIAS  release_8 Revision v8.23
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 ()
 
 getRefinery ()
 
 getImagePathResolver ()
 
 getDataFactory ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 getDecoratedRenderer (Renderer $default)
 
 normalizeHTML (string $html)
 
 assertHTMLEquals (string $expected_html_as_string, string $html_as_string)
 

Protected Member Functions

 buildFactory ()
 
- Protected Member Functions inherited from ILIAS_UI_TestBase
 brutallyTrimHTML (string $html)
 A more radical version of normalizeHTML. More...
 
 brutallyTrimSignals (string $html)
 A naive replacement of all il_signal-ids with dots to ease comparisons of rendered output. More...
 

Protected Attributes

Workflow Factory $f
 

Detailed Description

Definition at line 26 of file WorkflowStepTest.php.

Member Function Documentation

◆ buildFactory()

WorkflowStepTest::buildFactory ( )
protected

Definition at line 30 of file WorkflowStepTest.php.

Referenced by setUp().

+ Here is the caller graph for this function:

◆ setUp()

WorkflowStepTest::setUp ( )

Definition at line 35 of file WorkflowStepTest.php.

References buildFactory().

35  : void
36  {
37  $this->f = $this->buildFactory();
38  }
+ Here is the call graph for this function:

◆ test_constructor_params()

WorkflowStepTest::test_constructor_params ( )

Definition at line 46 of file WorkflowStepTest.php.

46  : void
47  {
48  $label = 'label';
49  $description = 'description';
50  $step = $this->f->step($label, $description);
51  $this->assertEquals($label, $step->getLabel());
52  $this->assertEquals($description, $step->getDescription());
53  $this->assertEquals(Workflow\Step::NOT_STARTED, $step->getStatus());
54  }

◆ test_implements_factory_interface()

WorkflowStepTest::test_implements_factory_interface ( )

Definition at line 40 of file WorkflowStepTest.php.

40  : void
41  {
42  $step = $this->f->step('');
43  $this->assertInstanceOf(Workflow\Step::class, $step);
44  }

◆ test_withStatus()

WorkflowStepTest::test_withStatus ( )

Definition at line 56 of file WorkflowStepTest.php.

56  : void
57  {
58  $status = Workflow\Step::SUCCESSFULLY;
59  $step = $this->f->step('')->withStatus($status);
60  $this->assertEquals($status, $step->getStatus());
61  }

◆ test_withStatus_wrong_args()

WorkflowStepTest::test_withStatus_wrong_args ( )

Definition at line 63 of file WorkflowStepTest.php.

References Vendor\Package\$e.

63  : void
64  {
65  $status = 100;
66  $raised = false;
67  try {
68  $this->f->step('')->withStatus($status);
69  } catch (InvalidArgumentException $e) {
70  $raised = true;
71  }
72  $this->assertTrue($raised);
73  }

Field Documentation

◆ $f

Workflow Factory WorkflowStepTest::$f
protected

Definition at line 28 of file WorkflowStepTest.php.


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