support different formats in user timesheet exports (#1222)
This commit is contained in:
@@ -22,7 +22,7 @@ class MarkdownExtensionTest extends TestCase
|
||||
{
|
||||
public function testGetFilters()
|
||||
{
|
||||
$loader = $this->getMockBuilder(ConfigLoaderInterface::class)->getMock();
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = new TimesheetConfiguration($loader, ['markdown_content' => true]);
|
||||
$sut = new MarkdownExtension(new Markdown(), $config);
|
||||
$filters = $sut->getFilters();
|
||||
@@ -34,7 +34,7 @@ class MarkdownExtensionTest extends TestCase
|
||||
|
||||
public function testMarkdownToHtml()
|
||||
{
|
||||
$loader = $this->getMockBuilder(ConfigLoaderInterface::class)->getMock();
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = new TimesheetConfiguration($loader, ['markdown_content' => true]);
|
||||
$sut = new MarkdownExtension(new Markdown(), $config);
|
||||
$this->assertEquals('<p><em>test</em></p>', $sut->markdownToHtml('*test*'));
|
||||
@@ -43,7 +43,7 @@ class MarkdownExtensionTest extends TestCase
|
||||
|
||||
public function testTimesheetContent()
|
||||
{
|
||||
$loader = $this->getMockBuilder(ConfigLoaderInterface::class)->getMock();
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = new TimesheetConfiguration($loader, ['markdown_content' => false]);
|
||||
$sut = new MarkdownExtension(new Markdown(), $config);
|
||||
$this->assertEquals(
|
||||
|
||||
@@ -24,7 +24,7 @@ class WidgetExtensionTest extends TestCase
|
||||
{
|
||||
protected function getSut($hasWidget = null, $getWidget = null, $renderer = null): WidgetExtension
|
||||
{
|
||||
$service = $this->getMockBuilder(WidgetService::class)->disableOriginalConstructor()->setMethods(['hasWidget', 'getWidget', 'findRenderer'])->getMock();
|
||||
$service = $this->getMockBuilder(WidgetService::class)->disableOriginalConstructor()->onlyMethods(['hasWidget', 'getWidget', 'findRenderer'])->getMock();
|
||||
if (null !== $hasWidget) {
|
||||
$service->expects($this->once())->method('hasWidget')->willReturn($hasWidget);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user