ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\ContentPage\PageReadingTimeTest Class Reference
+ Inheritance diagram for ILIAS\ContentPage\PageReadingTimeTest:
+ Collaboration diagram for ILIAS\ContentPage\PageReadingTimeTest:

Public Member Functions

 testPageReadingTimeValueThrowsExceptionWhenConstructedWithInvalidTypes (mixed $mixedType)
 
 testRawReadingTimeCanBeRetrievedFromValueObject ()
 

Static Public Member Functions

static mixedReadingTypesProvider ()
 

Detailed Description

Definition at line 29 of file PageReadingTimeTest.php.

Member Function Documentation

◆ mixedReadingTypesProvider()

static ILIAS\ContentPage\PageReadingTimeTest::mixedReadingTypesProvider ( )
static

Definition at line 31 of file PageReadingTimeTest.php.

References null.

31  : array
32  {
33  return [
34  'Float Type' => [4.0],
35  'String Type' => ['4'],
36  'Array Type' => [[4]],
37  'Object Type' => [new stdClass()],
38  'Boolean Type' => [false],
39  'Null Type' => [null],
40  'Ressource Type' => [fopen('php://temp', 'rb')]
41  ];
42  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ testPageReadingTimeValueThrowsExceptionWhenConstructedWithInvalidTypes()

ILIAS\ContentPage\PageReadingTimeTest::testPageReadingTimeValueThrowsExceptionWhenConstructedWithInvalidTypes ( mixed  $mixedType)

Definition at line 45 of file PageReadingTimeTest.php.

45  : void
46  {
47  $this->expectException(TypeError::class);
48 
49  $readingTime = new PageReadingTime($mixedType);
50  }

◆ testRawReadingTimeCanBeRetrievedFromValueObject()

ILIAS\ContentPage\PageReadingTimeTest::testRawReadingTimeCanBeRetrievedFromValueObject ( )

Definition at line 52 of file PageReadingTimeTest.php.

52  : void
53  {
54  $readingTime = new PageReadingTime(5);
55  $this->assertSame(5, $readingTime->minutes());
56  }

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