ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables 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 15 of file PositiveIntegerTest.php.

Member Function Documentation

◆ testCreatePositiveInteger()

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

Definition at line 20 of file PositiveIntegerTest.php.

21  {
22  $integer = new PositiveInteger(6);
23  $this->assertSame(6, $integer->getValue());
24  }

◆ testMaximumIntegerIsAccepted()

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

Definition at line 41 of file PositiveIntegerTest.php.

42  {
43  $integer = new PositiveInteger(PHP_INT_MAX);
44  $this->assertSame(PHP_INT_MAX, $integer->getValue());
45  }

◆ testNegativeIntegerThrowsException()

ILIAS\Data\PositiveIntegerTest::testNegativeIntegerThrowsException ( )

Definition at line 26 of file PositiveIntegerTest.php.

27  {
28  $this->expectNotToPerformAssertions();
29 
30  try {
31  $integer = new PositiveInteger(-6);
32  } catch (ConstraintViolationException $exception) {
33  return;
34  }
35  $this->fail();
36  }

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