support different formats in user timesheet exports (#1222)
This commit is contained in:
@@ -29,7 +29,7 @@ class DailyWorkingTimeChartTest extends TestCase
|
||||
{
|
||||
public function createSut(): AbstractWidgetType
|
||||
{
|
||||
$repository = $this->getMockBuilder(TimesheetRepository::class)->disableOriginalConstructor()->getMock();
|
||||
$repository = $this->createMock(TimesheetRepository::class);
|
||||
$mockFactory = new UserDateTimeFactoryFactory($this);
|
||||
$userFactory = new CurrentUserFactory($this);
|
||||
$user = $userFactory->create(new User(), 'Europe/Berlin');
|
||||
@@ -100,7 +100,7 @@ class DailyWorkingTimeChartTest extends TestCase
|
||||
|
||||
public function testGetData()
|
||||
{
|
||||
$repository = $this->getMockBuilder(TimesheetRepository::class)->disableOriginalConstructor()->setMethods(['getDailyData'])->getMock();
|
||||
$repository = $this->getMockBuilder(TimesheetRepository::class)->disableOriginalConstructor()->onlyMethods(['getDailyData'])->getMock();
|
||||
$repository->expects($this->once())->method('getDailyData')->willReturnCallback(function ($user, $begin, $end) {
|
||||
return [
|
||||
['year' => '2019', 'month' => '1', 'day' => 1, 'rate' => 13.75, 'duration' => 1234]
|
||||
|
||||
Reference in New Issue
Block a user