ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilBuddySystemRelationStateNullFilterRuleTest Class Reference
+ Inheritance diagram for ilBuddySystemRelationStateNullFilterRuleTest:
+ Collaboration diagram for ilBuddySystemRelationStateNullFilterRuleTest:

Public Member Functions

 testConstruct ()
 
 testMatches (ilBuddySystemRelationStateNullFilterRule $instance)
 testConstruct More...
 
 testInvoke (ilBuddySystemRelationStateNullFilterRule $instance)
 testConstruct More...
 
 testGetStates ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilBuddySystemBaseTest
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 

Detailed Description

Member Function Documentation

◆ testConstruct()

ilBuddySystemRelationStateNullFilterRuleTest::testConstruct ( )

Definition at line 23 of file ilBuddySystemRelationStateNullFilterRuleTest.php.

24  {
25  $relation = $this->getMockBuilder(ilBuddySystemRelation::class)->disableOriginalConstructor()->getMock();
26  $instance = new ilBuddySystemRelationStateNullFilterRule($relation);
27  $this->assertInstanceOf(
28  ilBuddySystemRelationStateNullFilterRule::class,
29  $instance
30  );
31 
32  return $instance;
33  }

◆ testGetStates()

ilBuddySystemRelationStateNullFilterRuleTest::testGetStates ( )

Definition at line 51 of file ilBuddySystemRelationStateNullFilterRuleTest.php.

51  : void
52  {
53  $relation = $this->getMockBuilder(ilBuddySystemRelation::class)->disableOriginalConstructor()->getMock();
54 
55  $instance = new ilBuddySystemRelationStateNullFilterRule($relation);
56 
57  $filtered = $this->getMockBuilder(ilBuddySystemRelationStateCollection::class)->disableOriginalConstructor()->getMock();
58 
59  $collection = $this->getMockBuilder(ilBuddySystemRelationStateCollection::class)->disableOriginalConstructor()->getMock();
60  $collection->expects(self::once())->method('filter')->with($instance)->willReturn($filtered);
61 
62  $state = $this->getMockBuilder(ilBuddySystemRelationState::class)->disableOriginalConstructor()->getMock();
63  $state->expects(self::once())->method('getPossibleTargetStates')->willReturn($collection);
64 
65  $relation->expects(self::once())->method('getState')->willReturn($state);
66 
67  $this->assertEquals($filtered, $instance->getStates());
68  }

◆ testInvoke()

ilBuddySystemRelationStateNullFilterRuleTest::testInvoke ( ilBuddySystemRelationStateNullFilterRule  $instance)

testConstruct

Definition at line 46 of file ilBuddySystemRelationStateNullFilterRuleTest.php.

46  : void
47  {
48  $this->assertTrue($instance($this->getMockBuilder(ilBuddySystemRelationState::class)->disableOriginalConstructor()->getMock()));
49  }

◆ testMatches()

ilBuddySystemRelationStateNullFilterRuleTest::testMatches ( ilBuddySystemRelationStateNullFilterRule  $instance)

testConstruct

Definition at line 38 of file ilBuddySystemRelationStateNullFilterRuleTest.php.

References ilBuddySystemRelationStateNullFilterRule\matches().

38  : void
39  {
40  $this->assertTrue($instance->matches());
41  }
+ Here is the call graph for this function:

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