ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
ILIAS\Data\PositiveIntegerTest Class Reference
+ Inheritance diagram for ILIAS\Data\PositiveIntegerTest:
+ Collaboration diagram for ILIAS\Data\PositiveIntegerTest:

Public Member Functions

 testCreatePositiveInteger ()
 
 testNegativeIntegerThrowsException ()
 
 testMaximumIntegerIsAccepted ()
 

Detailed Description

Definition at line 32 of file PositiveIntegerTest.php.

Member Function Documentation

◆ testCreatePositiveInteger()

ILIAS\Data\PositiveIntegerTest::testCreatePositiveInteger ( )
Exceptions
ConstraintViolationException

Definition at line 37 of file PositiveIntegerTest.php.

37 : void
38 {
39 $integer = new PositiveInteger(6);
40 $this->assertSame(6, $integer->getValue());
41 }

◆ testMaximumIntegerIsAccepted()

ILIAS\Data\PositiveIntegerTest::testMaximumIntegerIsAccepted ( )
Exceptions
ConstraintViolationException

Definition at line 58 of file PositiveIntegerTest.php.

58 : void
59 {
60 $integer = new PositiveInteger(PHP_INT_MAX);
61 $this->assertSame(PHP_INT_MAX, $integer->getValue());
62 }

◆ testNegativeIntegerThrowsException()

ILIAS\Data\PositiveIntegerTest::testNegativeIntegerThrowsException ( )

Definition at line 43 of file PositiveIntegerTest.php.

43 : void
44 {
45 $this->expectNotToPerformAssertions();
46
47 try {
48 $integer = new PositiveInteger(-6);
49 } catch (ConstraintViolationException $exception) {
50 return;
51 }
52 $this->fail();
53 }

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