support different formats in user timesheet exports (#1222)

This commit is contained in:
Kevin Papst
2019-11-08 16:10:38 +01:00
committed by GitHub
parent 0705c26513
commit fa1c79e15c
75 changed files with 1872 additions and 951 deletions

View File

@@ -24,7 +24,7 @@ class CompoundChartRendererTest extends TestCase
{
public function testSupports()
{
$twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
$twig = $this->createMock(Environment::class);
$sut = new CompoundChartRenderer($twig);
self::assertTrue($sut->supports(new CompoundChart()));
self::assertFalse($sut->supports(new CompoundRow()));
@@ -32,7 +32,7 @@ class CompoundChartRendererTest extends TestCase
public function testRenderWithCounter()
{
$twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->setMethods(['render'])->getMock();
$twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->onlyMethods(['render'])->getMock();
$twig->expects($this->once())->method('render')->willReturnCallback(function ($name, $options) {
return json_encode([$name, $options]);
});