ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
FactoryTest.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
8 namespace ILIAS\Tests\Refinery;
9 
11 
12 require_once('./libs/composer/vendor/autoload.php');
13 require_once('./tests/Refinery/TestCase.php');
14 
15 class FactoryTest extends TestCase
16 {
20  private $basicFactory;
21 
22  public function setUp() : void
23  {
24  $language = $this->getMockBuilder('\ilLanguage')
25  ->disableOriginalConstructor()
26  ->getMock();
27 
28  $this->basicFactory = new Factory(new \ILIAS\Data\Factory(), $language);
29  }
30 
31  public function testCreateToGroup()
32  {
33  $group = $this->basicFactory->to();
34 
35  $this->assertInstanceOf(\ILIAS\Refinery\To\Group::class, $group);
36  }
37 
38  public function testCreateInGroup()
39  {
40  $group = $this->basicFactory->in();
41 
42  $this->assertInstanceOf(\ILIAS\Refinery\In\Group::class, $group);
43  }
44 
45  public function testCreateIntegerGroup()
46  {
47  $group = $this->basicFactory->int();
48 
49  $this->assertInstanceOf(\ILIAS\Refinery\Integer\Group::class, $group);
50  }
51 
52  public function testCreateStringGroup()
53  {
54  $group = $this->basicFactory->string();
55 
56  $this->assertInstanceOf(\ILIAS\Refinery\String\Group::class, $group);
57  }
58 
59  public function testCreateNumericGroup()
60  {
61  $group = $this->basicFactory->numeric();
62 
63  $this->assertInstanceOf(\ILIAS\Refinery\Numeric\Group::class, $group);
64  }
65 
66  public function testCreateLogicalGroup()
67  {
68  $group = $this->basicFactory->logical();
69 
70  $this->assertInstanceOf(\ILIAS\Refinery\Logical\Group::class, $group);
71  }
72 
73  public function testCreatePasswordGroup()
74  {
75  $group = $this->basicFactory->password();
76 
77  $this->assertInstanceOf(\ILIAS\Refinery\Password\Group::class, $group);
78  }
79 
80  public function testCreateCustomGroup()
81  {
82  $group = $this->basicFactory->custom();
83 
84  $this->assertInstanceOf(\ILIAS\Refinery\Custom\Group::class, $group);
85  }
86 
87  public function testCreateContainerGroup()
88  {
89  $group = $this->basicFactory->container();
90 
91  $this->assertInstanceOf(\ILIAS\Refinery\Container\Group::class, $group);
92  }
93 
94  public function testCreateDateTimeGroup()
95  {
96  $group = $this->basicFactory->dateTime();
97  $this->assertInstanceOf(\ILIAS\Refinery\DateTime\Group::class, $group);
98  }
99 
100  public function testCreateUriGrouo()
101  {
102  $group = $this->basicFactory->uri();
103  $this->assertInstanceOf(\ILIAS\Refinery\URI\Group::class, $group);
104  }
105 }
Class ChatMainBarProvider .