Definition at line 9 of file ilRandomTest.php.
◆ intArguments()
ilRandomTest::intArguments |
( |
| ) |
|
Definition at line 60 of file ilRandomTest.php.
63 'No arguments can be provided' => [],
64 'One argument can be provided' => [34],
65 '2 arguments can be provided' => [-20, 30],
66 'The limit is inclusive' => [8, 8]
◆ testConstruct()
ilRandomTest::testConstruct |
( |
| ) |
|
Definition at line 11 of file ilRandomTest.php.
13 $this->assertInstanceOf(\ilRandom::class,
new ilRandom());
Wrapper for generation of random numbers, strings, bytes.
◆ testIntSuccessfully()
ilRandomTest::testIntSuccessfully |
( |
int ... |
$arguments | ) |
|
intArguments
Definition at line 19 of file ilRandomTest.php.
References Vendor\Package\$e.
21 $this->expectNotToPerformAssertions();
23 $random = new \ilRandom();
25 $random->int(...$arguments);
27 $this->fail(
'Expected no exception.');
◆ testIntWithInvalidArguments()
ilRandomTest::testIntWithInvalidArguments |
( |
| ) |
|
Definition at line 31 of file ilRandomTest.php.
33 $this->expectException(Error::class);
34 $random = new \ilRandom();
◆ testLogIfPossible()
ilRandomTest::testLogIfPossible |
( |
| ) |
|
Definition at line 39 of file ilRandomTest.php.
References $factory, $GLOBALS, and ilLogLevel\ERROR.
41 $this->expectException(Error::class);
43 $logger = $this->getMockBuilder(\ilLogger::class)->disableOriginalConstructor()->getMock();
45 $logger->expects(self::once())->method(
'error');
47 $factory = $this->getMockBuilder(ilLoggerFactory::class)->disableOriginalConstructor()->getMock();
48 $factory->expects(self::once())->method(
'getComponentLogger')->with(
'rnd')->willReturn($logger);
54 $random = new \ilRandom();
Customizing of pimple-DIC for ILIAS.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
The documentation for this class was generated from the following file: