ILIAS  release_8 Revision v8.19
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 18 of file PositiveIntegerTest.php.

Member Function Documentation

◆ testCreatePositiveInteger()

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

Definition at line 23 of file PositiveIntegerTest.php.

23  : void
24  {
25  $integer = new PositiveInteger(6);
26  $this->assertSame(6, $integer->getValue());
27  }

◆ testMaximumIntegerIsAccepted()

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

Definition at line 44 of file PositiveIntegerTest.php.

44  : void
45  {
46  $integer = new PositiveInteger(PHP_INT_MAX);
47  $this->assertSame(PHP_INT_MAX, $integer->getValue());
48  }

◆ testNegativeIntegerThrowsException()

ILIAS\Data\PositiveIntegerTest::testNegativeIntegerThrowsException ( )

Definition at line 29 of file PositiveIntegerTest.php.

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

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