ILIAS
trunk Revision v11.0_alpha-1753-gb21ca8c4367
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
PositiveIntegerTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
24
namespace
ILIAS\Data
;
25
26
use
ILIAS\Refinery\ConstraintViolationException
;
27
use
PHPUnit\Framework\TestCase
;
28
29
require_once(
"vendor/composer/vendor/autoload.php"
);
30
31
class
PositiveIntegerTest
extends
TestCase
32
{
36
public
function
testCreatePositiveInteger
(): void
37
{
38
$integer =
new
PositiveInteger
(6);
39
$this->assertSame(6, $integer->getValue());
40
}
41
42
public
function
testNegativeIntegerThrowsException
(): void
43
{
44
$this->expectNotToPerformAssertions();
45
46
try
{
47
$integer =
new
PositiveInteger
(-6);
48
}
catch
(
ConstraintViolationException
$exception) {
49
return
;
50
}
51
$this->fail();
52
}
53
57
public
function
testMaximumIntegerIsAccepted
(): void
58
{
59
$integer =
new
PositiveInteger
(PHP_INT_MAX);
60
$this->assertSame(PHP_INT_MAX, $integer->getValue());
61
}
62
}
ILIAS\Data\PositiveIntegerTest\testCreatePositiveInteger
testCreatePositiveInteger()
Definition:
PositiveIntegerTest.php:36
ILIAS\Data\PositiveIntegerTest
Definition:
PositiveIntegerTest.php:31
ILIAS\Data\PositiveIntegerTest\testNegativeIntegerThrowsException
testNegativeIntegerThrowsException()
Definition:
PositiveIntegerTest.php:42
ILIAS\Data\PositiveInteger
Definition:
PositiveInteger.php:28
ILIAS\Refinery\ConstraintViolationException
Definition:
ConstraintViolationException.php:29
ILIAS\Data\PositiveIntegerTest\testMaximumIntegerIsAccepted
testMaximumIntegerIsAccepted()
Definition:
PositiveIntegerTest.php:57
TestCase
ConstraintViolationException
ILIAS\Data
Definition:
Alphanumeric.php:24
components
ILIAS
Data
tests
PositiveIntegerTest.php
Generated on Thu Apr 10 2025 23:03:01 for ILIAS by
1.8.13 (using
Doxyfile
)