ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Tests\Refinery\Integer\GroupTest Class Reference
+ Inheritance diagram for ILIAS\Tests\Refinery\Integer\GroupTest:
+ Collaboration diagram for ILIAS\Tests\Refinery\Integer\GroupTest:

Public Member Functions

 testGreaterThanInstance ()
 
 testLowerThanInstance ()
 
 testGreaterThanOrEqualInstance ()
 
 testLessThanOrEqualInstance ()
 
 testIsBetween ()
 

Protected Member Functions

 setUp ()
 

Private Attributes

IntegerGroup $group
 

Detailed Description

Definition at line 34 of file GroupTest.php.

Member Function Documentation

◆ setUp()

ILIAS\Tests\Refinery\Integer\GroupTest::setUp ( )
protected

Definition at line 38 of file GroupTest.php.

38 : void
39 {
40 $dataFactory = new Factory();
41 $language = $this->getMockBuilder(Language::class)
42 ->disableOriginalConstructor()
43 ->getMock();
44 $in = $this->getMockBuilder(InGroup::class)
45 ->disableOriginalConstructor()
46 ->getMock();
47
48 $this->group = new IntegerGroup($dataFactory, $language, $in);
49 }

◆ testGreaterThanInstance()

ILIAS\Tests\Refinery\Integer\GroupTest::testGreaterThanInstance ( )

Definition at line 51 of file GroupTest.php.

51 : void
52 {
53 $instance = $this->group->isGreaterThan(42);
54 $this->assertInstanceOf(GreaterThan::class, $instance);
55 }

◆ testGreaterThanOrEqualInstance()

ILIAS\Tests\Refinery\Integer\GroupTest::testGreaterThanOrEqualInstance ( )

Definition at line 62 of file GroupTest.php.

62 : void
63 {
64 $instance = $this->group->isGreaterThanOrEqual(42);
65 $this->assertInstanceOf(GreaterThanOrEqual::class, $instance);
66 }

◆ testIsBetween()

ILIAS\Tests\Refinery\Integer\GroupTest::testIsBetween ( )

Definition at line 74 of file GroupTest.php.

74 : void
75 {
76 $dataFactory = $this->getMockBuilder(Factory::class)->disableOriginalConstructor()->getMock();
77 $language = $this->getMockBuilder(Language::class)->disableOriginalConstructor()->getMock();
78 $in = $this->getMockBuilder(InGroup::class)->disableOriginalConstructor()->getMock();
79 $series = $this->getMockBuilder(Constraint::class)->getMock();
80
81 $in->expects(self::once())->method('series')->willReturnCallback(function (array $array) use ($series) {
82 $this->assertSame(2, count($array));
83 $this->assertInstanceOf(GreaterThanOrEqual::class, $array[0]);
84 $this->assertInstanceOf(LessThanOrEqual::class, $array[1]);
85
86 return $series;
87 });
88
89 $group = new IntegerGroup($dataFactory, $language, $in);
90 $this->assertSame($series, $group->isBetween(4, 8));
91 }

References ILIAS\Tests\Refinery\Integer\GroupTest\$group.

◆ testLessThanOrEqualInstance()

ILIAS\Tests\Refinery\Integer\GroupTest::testLessThanOrEqualInstance ( )

Definition at line 68 of file GroupTest.php.

68 : void
69 {
70 $instance = $this->group->isLessThanOrEqual(42);
71 $this->assertInstanceOf(LessThanOrEqual::class, $instance);
72 }

◆ testLowerThanInstance()

ILIAS\Tests\Refinery\Integer\GroupTest::testLowerThanInstance ( )

Definition at line 56 of file GroupTest.php.

56 : void
57 {
58 $instance = $this->group->isLessThan(42);
59 $this->assertInstanceOf(LessThan::class, $instance);
60 }

Field Documentation

◆ $group

IntegerGroup ILIAS\Tests\Refinery\Integer\GroupTest::$group
private

Definition at line 36 of file GroupTest.php.

Referenced by ILIAS\Tests\Refinery\Integer\GroupTest\testIsBetween().


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