Skip to content

Commit a4022b0

Browse files
committed
Add test case
1 parent fb41b12 commit a4022b0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/TestCase/Controller/Admin/QueueControllerTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
use Cake\Datasource\ConnectionManager;
66
use Cake\I18n\FrozenTime;
77
use Cake\TestSuite\IntegrationTestCase;
8+
use Queue\Controller\Admin\QueueController;
9+
use Shim\TestSuite\TestTrait;
10+
use Tools\Utility\FrozenTime as UtilityFrozenTime;
811

912
/**
1013
* @uses \Queue\Controller\Admin\QueueController
1114
*/
1215
class QueueControllerTest extends IntegrationTestCase {
1316

17+
use TestTrait;
18+
1419
/**
1520
* Fixtures
1621
*
@@ -30,6 +35,18 @@ public function setUp(): void {
3035
$this->disableErrorHandlerMiddleware();
3136
}
3237

38+
/**
39+
* @return void
40+
*/
41+
public function testLoadHelpers(): void {
42+
$controller = new QueueController();
43+
$this->invokeMethod($controller, 'loadHelpers');
44+
45+
$view = $controller->createView();
46+
$engine = $view->Time->getConfig('engine');
47+
$this->assertSame(UtilityFrozenTime::class, $engine);
48+
}
49+
3350
/**
3451
* Test index method
3552
*

0 commit comments

Comments
 (0)