3declare(strict_types=1);
24use PHPUnit\Framework\TestCase;
39 $this->assertEquals(self::VALID_POINTS_1, $obj->getPoints());
40 $this->assertEquals(self::VALID_STATUS_1, $obj->getStatus());
48 }
catch (InvalidArgumentException
$e) {
49 $this->assertTrue(
true);
58 }
catch (InvalidArgumentException
$e) {
59 $this->assertTrue(
true);
68 }
catch (InvalidArgumentException
$e) {
69 $this->assertTrue(
true);
77 $new = $obj->withPoints(self::VALID_POINTS_2);
79 $this->assertEquals(self::VALID_POINTS_1, $obj->getPoints());
80 $this->assertEquals(self::VALID_POINTS_2, $new->getPoints());
88 $obj->withPoints(self::INVALID_POINTS);
90 }
catch (InvalidArgumentException
$e) {
91 $this->assertTrue(
true);
99 $new = $obj->withStatus(self::VALID_STATUS_2);
101 $this->assertEquals(self::VALID_STATUS_1, $obj->getStatus());
102 $this->assertEquals(self::VALID_STATUS_2, $new->getStatus());
110 $obj->withStatus(self::INVALID_STATUS);
112 }
catch (InvalidArgumentException
$e) {
113 $this->assertTrue(
true);
119 $lng = $this->createMock(ilLanguage::class);
133 $lng->expects($this->atLeastOnce())
137 [
'prg_points_byline'],
139 [
'prg_status_draft'],
140 [
'prg_status_active'],
141 [
'prg_status_outdated'],
142 [
'prg_status_byline'],
145 ->will($this->onConsecutiveCalls(
151 'prg_status_outdated',
157 $field = $obj->toFormInput(
163 $this->assertInstanceOf(
170 $this->assertInstanceOf(
175 $this->assertInstanceOf(
testFailCreateWithInvalidPointAndInvalidStatus()
testFailCreateWithInvalidPoints()
testFailCreateWithInvalidStatus()
testSuccessfulWithPoints()
testSuccessfulWithStatus()
Refinery Factory $refinery
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.