ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
WorkflowStepTest Class Reference
+ Inheritance diagram for WorkflowStepTest:
+ Collaboration diagram for WorkflowStepTest:

Public Member Functions

 setUp ()
 
 testImplementsFactoryInterface ()
 
 testConstructorParams ()
 
 testWithStatus ()
 
 testWithStatusWrongArgs ()
 

Protected Member Functions

 buildFactory ()
 

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:

◆ testConstructorParams()

WorkflowStepTest::testConstructorParams ( )

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  }

◆ testImplementsFactoryInterface()

WorkflowStepTest::testImplementsFactoryInterface ( )

Definition at line 40 of file WorkflowStepTest.php.

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

◆ testWithStatus()

WorkflowStepTest::testWithStatus ( )

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  }

◆ testWithStatusWrongArgs()

WorkflowStepTest::testWithStatusWrongArgs ( )

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: