dataFactory = new Factory(); $this->language = $this->getMockBuilder('\ilLanguage') ->disableOriginalConstructor() ->getMock(); $this->group = new Group($this->dataFactory, $this->language); $this->greaterThanConstraint = new GreaterThan(2, $this->dataFactory, $this->language); $this->lessThanConstaint = new LessThan(5, $this->dataFactory, $this->language); } public function testLogicalOrGroup() { $instance = $this->group->logicalOr(array($this->greaterThanConstraint, $this->lessThanConstaint)); $this->assertInstanceOf(LogicalOr::class, $instance); } public function testNotGroup() { $instance = $this->group->not($this->greaterThanConstraint); $this->assertInstanceOf(Not::class, $instance); } public function testParallelGroup() { $instance = $this->group->parallel(array($this->greaterThanConstraint, $this->lessThanConstaint)); $this->assertInstanceOf(Parallel::class, $instance); } public function testSequentialGroup() { $instance = $this->group->sequential(array($this->greaterThanConstraint, $this->lessThanConstaint)); $this->assertInstanceOf(Sequential::class, $instance); } }