fix css never been loaded

This commit is contained in:
stefan.tollkuehn committed 2026-10-22 17:55:51 +02:00
1 parent 5fc89dfff4
commit 8910a46d1d
4 files changed
+48

No files matched your search

+18
View File
@@ -24,6 +24,8 @@ use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
require_once __DIR__ . '/OCUtilStub.php';
class CalendarControllerTest extends TestCase
{
private IManager&MockObject $calendarManager;
@@ -709,4 +711,20 @@ class CalendarControllerTest extends TestCase
$response->getParams()['errors'][0]['error']
);
}
public function testConfirmRegistersStylesheet(): void
{
$this->userSession->method('getUser')->willReturn($this->mockUser('alice'));
$this->setUpWritableCalendars();
$this->urlGenerator->method('getAbsoluteURL')->willReturn('https://cloud.example.com/');
$c = $this->newController();
$c->confirm('Weekly sync', '', '2026-10-07T14:15', '2026-10-07T15:15');
$this->assertContains(
['atocal', 'style', false],
\OC_Util::$styles
);
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
/*
* Minimal stand-in for the server class OC_Util, which is not part
* of the OCP vendor package. Records addStyle() calls for assertions.
*/
if (!class_exists(\OC_Util::class, false)) {
class OC_Util
{
/** @var list<array{string, ?string, bool}> */
public static array $styles = [];
public static function addStyle(
string $application,
?string $file = null,
bool $prepend = false
): void {
self::$styles[] = [$application, $file, $prepend];
}
}
}