diff --git a/tests/TestCase/Controller/Admin/QueuedJobsControllerTest.php b/tests/TestCase/Controller/Admin/QueuedJobsControllerTest.php index a319ce2b..f0fecf06 100644 --- a/tests/TestCase/Controller/Admin/QueuedJobsControllerTest.php +++ b/tests/TestCase/Controller/Admin/QueuedJobsControllerTest.php @@ -174,20 +174,36 @@ public function testStats() { } /** - * CakePHP's CspMiddleware stores the nonce as `cspScriptNonce`. + * CakePHP's CspMiddleware stores the nonces as `cspScriptNonce` and `cspStyleNonce`. * * @return void */ public function testStatsUsesCspScriptNonce(): void { Configure::write('Queue.isStatisticEnabled', true); $this->withRequestAttribute('cspScriptNonce', 'core-nonce'); + $this->withRequestAttribute('cspStyleNonce', 'style-nonce'); $this->get(['prefix' => 'Admin', 'plugin' => 'Queue', 'controller' => 'QueuedJobs', 'action' => 'stats']); $this->assertResponseCode(200); $this->assertResponseContains('