Class DataRetrievalTest.
More...
◆ setUp()
Results\Toplist\DataRetrievalTest::setUp |
( |
| ) |
|
|
protected |
◆ test_formatTime_shouldReturnFormattedTime()
Results\Toplist\DataRetrievalTest::test_formatTime_shouldReturnFormattedTime |
( |
| ) |
|
Definition at line 109 of file DataRetrievalTest.php.
111 $this->assertEquals(
'01:00:00', $this->tableObj->formatTime(3600));
112 $this->assertEquals(
'00:02:00', $this->tableObj->formatTime(120));
113 $this->assertEquals(
'00:02:01', $this->tableObj->formatTime(121));
114 $this->assertEquals(
'03:09:40', $this->tableObj->formatTime(11380));
◆ test_formatTime_shouldReturnZeroTime()
Results\Toplist\DataRetrievalTest::test_formatTime_shouldReturnZeroTime |
( |
| ) |
|
Definition at line 104 of file DataRetrievalTest.php.
106 $this->assertEquals(
'00:00:00', $this->tableObj->formatTime(0));
◆ test_getColumns_shouldReturnAllColumns()
Results\Toplist\DataRetrievalTest::test_getColumns_shouldReturnAllColumns |
( |
| ) |
|
Definition at line 68 of file DataRetrievalTest.php.
70 $this->testObjMock->method(
'getHighscoreAchievedTS')->willReturn(
true);
71 $this->testObjMock->method(
'getHighscoreScore')->willReturn(
true);
72 $this->testObjMock->method(
'getHighscorePercentage')->willReturn(
true);
73 $this->testObjMock->method(
'getHighscoreWTime')->willReturn(
true);
75 $columns = $this->tableObj->getColumns();
76 $this->assertIsArray($columns);
77 $this->assertNotEmpty($columns);
78 $this->assertArrayHasKey(
'is_actor', $columns);
79 $this->assertArrayHasKey(
'rank', $columns);
80 $this->assertArrayHasKey(
'participant', $columns);
81 $this->assertArrayHasKey(
'achieved', $columns);
82 $this->assertArrayHasKey(
'score', $columns);
83 $this->assertArrayHasKey(
'percentage', $columns);
84 $this->assertArrayHasKey(
'workingtime', $columns);
◆ test_getColumns_shouldReturnOnlySelectedColumns()
Results\Toplist\DataRetrievalTest::test_getColumns_shouldReturnOnlySelectedColumns |
( |
| ) |
|
Definition at line 87 of file DataRetrievalTest.php.
89 $this->testObjMock->method(
'getHighscoreAchievedTS')->willReturn(
true);
90 $this->testObjMock->method(
'getHighscoreScore')->willReturn(
false);
91 $this->testObjMock->method(
'getHighscorePercentage')->willReturn(
true);
92 $this->testObjMock->method(
'getHighscoreWTime')->willReturn(
false);
94 $columns = $this->tableObj->getColumns();
95 $this->assertIsArray($columns);
96 $this->assertNotEmpty($columns);
97 $this->assertArrayHasKey(
'achieved', $columns);
98 $this->assertArrayHasKey(
'percentage', $columns);
100 $this->assertArrayNotHasKey(
'score', $columns);
101 $this->assertArrayNotHasKey(
'workingtime', $columns);
◆ test_instantiateObject_shouldReturnInstance()
Results\Toplist\DataRetrievalTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 63 of file DataRetrievalTest.php.
65 $this->assertInstanceOf(DataRetrieval::class, $this->tableObj);
◆ $tableObj
◆ $testObjMock
ilObjTest Results\Toplist\DataRetrievalTest::$testObjMock |
|
private |
The documentation for this class was generated from the following file: