ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 31 of file PositiveIntegerTest.php.

Member Function Documentation

◆ testCreatePositiveInteger()

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

Definition at line 36 of file PositiveIntegerTest.php.

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

◆ testMaximumIntegerIsAccepted()

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

Definition at line 57 of file PositiveIntegerTest.php.

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

◆ testNegativeIntegerThrowsException()

ILIAS\Data\PositiveIntegerTest::testNegativeIntegerThrowsException ( )

Definition at line 42 of file PositiveIntegerTest.php.

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

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