Release 2.12 (#4609)
This commit is contained in:
@@ -31,12 +31,12 @@ class EncoreExtensionTest extends TestCase
|
||||
return new EncoreExtension($container, __DIR__ . '/../');
|
||||
}
|
||||
|
||||
public function testGetSubscribedServices()
|
||||
public function testGetSubscribedServices(): void
|
||||
{
|
||||
self::assertEquals([EntrypointLookupInterface::class], EncoreExtension::getSubscribedServices());
|
||||
}
|
||||
|
||||
public function testGetEncoreEntryCssSource()
|
||||
public function testGetEncoreEntryCssSource(): void
|
||||
{
|
||||
$sut = $this->getSut(['test.css', 'test1.css']);
|
||||
$css = 'body { margin: 0; }p
|
||||
|
||||
@@ -20,7 +20,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class MarkdownExtensionTest extends TestCase
|
||||
{
|
||||
public function testMarkdownToHtml()
|
||||
public function testMarkdownToHtml(): void
|
||||
{
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = SystemConfigurationFactory::create($loader, ['timesheet' => ['markdown_content' => true]]);
|
||||
@@ -33,7 +33,7 @@ class MarkdownExtensionTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testTimesheetContent()
|
||||
public function testTimesheetContent(): void
|
||||
{
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = SystemConfigurationFactory::create($loader, ['timesheet' => ['markdown_content' => false]]);
|
||||
@@ -60,7 +60,7 @@ class MarkdownExtensionTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testCommentContent()
|
||||
public function testCommentContent(): void
|
||||
{
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = SystemConfigurationFactory::create($loader, ['timesheet' => ['markdown_content' => false]]);
|
||||
@@ -100,7 +100,7 @@ class MarkdownExtensionTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testCommentOneLiner()
|
||||
public function testCommentOneLiner(): void
|
||||
{
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = SystemConfigurationFactory::create($loader, []);
|
||||
|
||||
@@ -87,21 +87,21 @@ class ThemeEventExtensionTest extends TestCase
|
||||
return $environment;
|
||||
}
|
||||
|
||||
public function testTrigger()
|
||||
public function testTrigger(): void
|
||||
{
|
||||
$sut = $this->getSut();
|
||||
$event = $sut->trigger($this->getEnvironment(), 'foo', []);
|
||||
self::assertInstanceOf(ThemeEvent::class, $event);
|
||||
}
|
||||
|
||||
public function testTriggerWithoutListener()
|
||||
public function testTriggerWithoutListener(): void
|
||||
{
|
||||
$sut = $this->getSut(false);
|
||||
$event = $sut->trigger($this->getEnvironment(), 'foo', []);
|
||||
self::assertInstanceOf(ThemeEvent::class, $event);
|
||||
}
|
||||
|
||||
public function testJavascriptTranslations()
|
||||
public function testJavascriptTranslations(): void
|
||||
{
|
||||
$sut = $this->getSut();
|
||||
$values = $sut->getJavascriptTranslations();
|
||||
@@ -145,13 +145,13 @@ class ThemeEventExtensionTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getProgressbarColors
|
||||
*/
|
||||
public function testProgressbarClass(string $expected, int $percent, ?bool $reverseColors = false)
|
||||
public function testProgressbarClass(string $expected, int $percent, ?bool $reverseColors = false): void
|
||||
{
|
||||
$sut = $this->getSut(false);
|
||||
self::assertEquals($expected, $sut->getProgressbarClass($percent, $reverseColors));
|
||||
}
|
||||
|
||||
public function testGetTitle()
|
||||
public function testGetTitle(): void
|
||||
{
|
||||
$sut = $this->getSut(false);
|
||||
$this->assertEquals('Kimai – foo', $sut->generateTitle());
|
||||
@@ -160,7 +160,7 @@ class ThemeEventExtensionTest extends TestCase
|
||||
$this->assertEquals('Kimai | foo', $sut->generateTitle(null, ' | '));
|
||||
}
|
||||
|
||||
public function testGetBrandedTitle()
|
||||
public function testGetBrandedTitle(): void
|
||||
{
|
||||
$sut = $this->getSut(false, 'MyCompany');
|
||||
$this->assertEquals('Kimai – foo', $sut->generateTitle());
|
||||
|
||||
@@ -22,7 +22,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class TimesheetExtensionTest extends TestCase
|
||||
{
|
||||
public function testActiveEntries()
|
||||
public function testActiveEntries(): void
|
||||
{
|
||||
$entries = [new Timesheet(), new Timesheet()];
|
||||
|
||||
@@ -36,7 +36,7 @@ class TimesheetExtensionTest extends TestCase
|
||||
self::assertEquals($entries, $sut->activeEntries(new User()));
|
||||
}
|
||||
|
||||
public function testRecentEntries()
|
||||
public function testRecentEntries(): void
|
||||
{
|
||||
$timesheet1 = $this->createMock(Timesheet::class);
|
||||
$timesheet1->method('getId')->willReturn(1);
|
||||
|
||||
@@ -62,7 +62,7 @@ class WidgetExtensionTest extends TestCase
|
||||
return $env;
|
||||
}
|
||||
|
||||
public function testRenderWidgetForInvalidValue()
|
||||
public function testRenderWidgetForInvalidValue(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Widget must be either a WidgetInterface or a string');
|
||||
@@ -72,7 +72,7 @@ class WidgetExtensionTest extends TestCase
|
||||
$sut->renderWidget($this->getEnvironment(), true);
|
||||
}
|
||||
|
||||
public function testRenderWidgetForUnknownWidget()
|
||||
public function testRenderWidgetForUnknownWidget(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Unknown widget "test" requested');
|
||||
@@ -81,7 +81,7 @@ class WidgetExtensionTest extends TestCase
|
||||
$sut->renderWidget($this->getEnvironment(), 'test');
|
||||
}
|
||||
|
||||
public function testRenderWidgetByString()
|
||||
public function testRenderWidgetByString(): void
|
||||
{
|
||||
$widget = new More();
|
||||
$widget->setId('test');
|
||||
@@ -92,7 +92,7 @@ class WidgetExtensionTest extends TestCase
|
||||
$this->assertEquals($options, $data);
|
||||
}
|
||||
|
||||
public function testRenderWidgetObject()
|
||||
public function testRenderWidgetObject(): void
|
||||
{
|
||||
$widget = new More();
|
||||
$sut = $this->getSut(null, null);
|
||||
|
||||
Reference in New Issue
Block a user