ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
LinearWorkflowTest Class Reference
+ Inheritance diagram for LinearWorkflowTest:
+ Collaboration diagram for LinearWorkflowTest:

Public Member Functions

 setUp ()
 
 test_implements_factory_interface ()
 
 test_constructor_params ()
 
 test_constructor ()
 
 test_amount_of_steps ()
 
 test_active ()
 
 test_withActive_throws ()
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getRefinery ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null)
 
 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 LinearWorkflowTest.php.

Member Function Documentation

◆ buildFactory()

LinearWorkflowTest::buildFactory ( )
protected

Definition at line 12 of file LinearWorkflowTest.php.

Referenced by setUp().

+ Here is the caller graph for this function:

◆ setUp()

LinearWorkflowTest::setUp ( )

Reimplemented from ILIAS_UI_TestBase.

Definition at line 17 of file LinearWorkflowTest.php.

17 : void
18 {
19 $f = $this->buildFactory();
20 $this->title = 'title';
21 $this->steps = [
22 $f->step('', ''),
23 $f->step('', '')
24 ];
25 $this->wf = $f->linear($this->title, $this->steps);
26 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ test_active()

LinearWorkflowTest::test_active ( )

Definition at line 52 of file LinearWorkflowTest.php.

53 {
54 $wf = $this->wf->withActive(1);
55 $this->assertEquals(1, $wf->getActive());
56 }

◆ test_amount_of_steps()

LinearWorkflowTest::test_amount_of_steps ( )

Definition at line 47 of file LinearWorkflowTest.php.

48 {
49 $this->assertEquals(count($this->steps), $this->wf->getAmountOfSteps());
50 }

◆ test_constructor()

LinearWorkflowTest::test_constructor ( )

Definition at line 40 of file LinearWorkflowTest.php.

41 {
42 $this->assertEquals($this->title, $this->wf->getTitle());
43 $this->assertEquals($this->steps, $this->wf->getSteps());
44 $this->assertEquals(0, $this->wf->getActive());
45 }

◆ test_constructor_params()

LinearWorkflowTest::test_constructor_params ( )

Definition at line 33 of file LinearWorkflowTest.php.

34 {
35 $this->assertEquals($this->title, $this->wf->getTitle());
36 $this->assertEquals($this->steps, $this->wf->getSteps());
37 $this->assertEquals(0, $this->wf->getActive());
38 }

◆ test_implements_factory_interface()

LinearWorkflowTest::test_implements_factory_interface ( )

Definition at line 28 of file LinearWorkflowTest.php.

29 {
30 $this->assertInstanceOf(Workflow\Workflow::class, $this->wf);
31 }

◆ test_withActive_throws()

LinearWorkflowTest::test_withActive_throws ( )

Definition at line 58 of file LinearWorkflowTest.php.

59 {
60 $raised = false;
61 try {
62 $this->wf->withActive(-1);
63 $this->assertFalse("This should not happen.");
64 } catch (\InvalidArgumentException $e) {
65 $raised = true;
66 }
67 $this->assertTrue($raised);
68
69 $raised = false;
70 try {
71 $this->wf->withActive(2);
72 $this->assertFalse("This should not happen.");
73 } catch (\InvalidArgumentException $e) {
74 $raised = true;
75 }
76 $this->assertTrue($raised);
77 }

References Vendor\Package\$e.


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