Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -7,13 +7,14 @@
* file that was distributed with this source code.
*/
namespace App\Tests\Reporting;
namespace App\Tests\Reporting\MonthByUser;
use App\Reporting\DateByUser;
use App\Reporting\MonthByUser;
use App\Reporting\MonthByUser\MonthByUser;
use App\Tests\Reporting\AbstractDateByUserTest;
/**
* @covers \App\Reporting\MonthByUser
* @covers \App\Reporting\MonthByUser\MonthByUser
* @covers \App\Reporting\DateByUser
*/
class MonthByUserTest extends AbstractDateByUserTest

View File

@@ -7,13 +7,14 @@
* file that was distributed with this source code.
*/
namespace App\Tests\Reporting;
namespace App\Tests\Reporting\MonthlyUserList;
use App\Reporting\AbstractUserList;
use App\Reporting\MonthlyUserList;
use App\Reporting\MonthlyUserList\MonthlyUserList;
use App\Tests\Reporting\AbstractUserListTest;
/**
* @covers \App\Reporting\MonthlyUserList
* @covers \App\Reporting\MonthlyUserList\MonthlyUserList
* @covers \App\Reporting\AbstractUserList
*/
class MonthlyUserListTest extends AbstractUserListTest

View File

@@ -41,7 +41,7 @@ class ProjectDateRangeQueryTest extends TestCase
$sut = new ProjectDateRangeQuery(new \DateTime(), new User());
$date = new \DateTime('+1 year');
$customer = new Customer();
$customer = new Customer('foo');
$sut->setMonth($date);
$sut->setCustomer($customer);

View File

@@ -28,7 +28,8 @@ class ProjectViewQueryTest extends TestCase
self::assertSame($date, $sut->getToday());
self::assertSame($user, $sut->getUser());
self::assertNull($sut->getCustomer());
self::assertFalse($sut->isIncludeNoBudget());
self::assertFalse($sut->isIncludeWithoutBudget());
self::assertTrue($sut->isIncludeWithBudget());
self::assertFalse($sut->isIncludeNoWork());
}
@@ -38,14 +39,24 @@ class ProjectViewQueryTest extends TestCase
$date = new \DateTime();
$sut = new ProjectViewQuery($date, $user);
$customer = new Customer();
$customer = new Customer('foo');
$sut->setCustomer($customer);
$sut->setIncludeNoBudget(true);
$sut->setIncludeNoWork(true);
self::assertSame($customer, $sut->getCustomer());
self::assertTrue($sut->isIncludeNoBudget());
self::assertTrue($sut->isIncludeNoWork());
$sut->setBudgetType(true);
self::assertTrue($sut->isIncludeWithBudget());
self::assertFalse($sut->isIncludeWithoutBudget());
$sut->setBudgetType(false);
self::assertFalse($sut->isIncludeWithBudget());
self::assertTrue($sut->isIncludeWithoutBudget());
$sut->setBudgetType(null);
self::assertFalse($sut->isIncludeWithBudget());
self::assertFalse($sut->isIncludeWithoutBudget());
}
}

View File

@@ -20,7 +20,7 @@ class ReportTest extends TestCase
{
public function testEmptyObject()
{
$report = new Report('id', 'route', 'label');
$report = new Report('id', 'route', 'label', 'reporting');
self::assertInstanceOf(ReportInterface::class, $report);
self::assertEquals('id', $report->getId());
self::assertEquals('route', $report->getRoute());

View File

@@ -26,6 +26,8 @@ class ReportingServiceTest extends TestCase
$dispatcher = $this->createMock(EventDispatcherInterface::class);
$dispatcher->expects($this->exactly($isGranted ? 1 : 0))->method('dispatch')->willReturnCallback(function ($event) {
$this->assertInstanceOf(ReportingEvent::class, $event);
return $event;
});
$security = $this->createMock(AuthorizationCheckerInterface::class);

View File

@@ -7,13 +7,14 @@
* file that was distributed with this source code.
*/
namespace App\Tests\Reporting;
namespace App\Tests\Reporting\WeekByUser;
use App\Reporting\DateByUser;
use App\Reporting\WeekByUser;
use App\Reporting\WeekByUser\WeekByUser;
use App\Tests\Reporting\AbstractDateByUserTest;
/**
* @covers \App\Reporting\WeekByUser
* @covers \App\Reporting\WeekByUser\WeekByUser
* @covers \App\Reporting\DateByUser
*/
class WeekByUserTest extends AbstractDateByUserTest

View File

@@ -7,13 +7,14 @@
* file that was distributed with this source code.
*/
namespace App\Tests\Reporting;
namespace App\Tests\Reporting\WeeklyUserList;
use App\Reporting\AbstractUserList;
use App\Reporting\WeeklyUserList;
use App\Reporting\WeeklyUserList\WeeklyUserList;
use App\Tests\Reporting\AbstractUserListTest;
/**
* @covers \App\Reporting\WeeklyUserList
* @covers \App\Reporting\WeeklyUserList\WeeklyUserList
* @covers \App\Reporting\AbstractUserList
*/
class WeeklyUserListTest extends AbstractUserListTest

View File

@@ -7,13 +7,14 @@
* file that was distributed with this source code.
*/
namespace App\Tests\Reporting;
namespace App\Tests\Reporting\YearByUser;
use App\Reporting\DateByUser;
use App\Reporting\YearByUser;
use App\Reporting\YearByUser\YearByUser;
use App\Tests\Reporting\AbstractDateByUserTest;
/**
* @covers \App\Reporting\YearByUser
* @covers \App\Reporting\YearByUser\YearByUser
* @covers \App\Reporting\DateByUser
*/
class YearByUserTest extends AbstractDateByUserTest

View File

@@ -7,13 +7,14 @@
* file that was distributed with this source code.
*/
namespace App\Tests\Reporting;
namespace App\Tests\Reporting\YearlyUserList;
use App\Reporting\AbstractUserList;
use App\Reporting\YearlyUserList;
use App\Reporting\YearlyUserList\YearlyUserList;
use App\Tests\Reporting\AbstractUserListTest;
/**
* @covers \App\Reporting\YearlyUserList
* @covers \App\Reporting\YearlyUserList\YearlyUserList
* @covers \App\Reporting\AbstractUserList
*/
class YearlyUserListTest extends AbstractUserListTest