ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
 
 getDecoratedRenderer (Renderer $default)
 
 normalizeHTML ($html)
 
 assertHTMLEquals ($expected_html_as_string, $html_as_string)
 

Protected Member Functions

 buildFactory ()
 
- Protected Member Functions inherited from ILIAS_UI_TestBase
 brutallyTrimHTML ($html)
 A more radical version of normalizeHTML. More...
 

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 ( )

Reimplemented from ILIAS_UI_TestBase.

Definition at line 16 of file WorkflowStepTest.php.

16 : void
17 {
18 $this->f = $this->buildFactory();
19 }

References buildFactory().

+ Here is the call graph for this function:

◆ test_constructor_params()

WorkflowStepTest::test_constructor_params ( )

Definition at line 27 of file WorkflowStepTest.php.

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 }

◆ test_implements_factory_interface()

WorkflowStepTest::test_implements_factory_interface ( )

Definition at line 21 of file WorkflowStepTest.php.

22 {
23 $step = $this->f->step('', '');
24 $this->assertInstanceOf(Workflow\Step::class, $step);
25 }

◆ test_withStatus()

WorkflowStepTest::test_withStatus ( )

Definition at line 37 of file WorkflowStepTest.php.

38 {
39 $status = Workflow\Step::SUCCESSFULLY;
40 $step = $this->f->step('', '')->withStatus($status);
41 $this->assertEquals($status, $step->getStatus());
42 }

◆ test_withStatus_wrong_args()

WorkflowStepTest::test_withStatus_wrong_args ( )

Definition at line 44 of file WorkflowStepTest.php.

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 }

References Vendor\Package\$e.


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