Release 2.0.35 (#4302)
This commit is contained in:
@@ -25,23 +25,21 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
*/
|
||||
class BundleInstallerCommandTest extends KernelTestCase
|
||||
{
|
||||
/**
|
||||
* @var Application
|
||||
*/
|
||||
protected $application;
|
||||
private Application $application;
|
||||
|
||||
/**
|
||||
* @param class-string $className
|
||||
*/
|
||||
protected function getCommand(string $className): Command
|
||||
{
|
||||
$kernel = self::bootKernel();
|
||||
$this->application = new Application($kernel);
|
||||
$container = self::$kernel->getContainer();
|
||||
|
||||
$this->application->add(new $className());
|
||||
|
||||
return $this->application->find('kimai:bundle:test:install');
|
||||
}
|
||||
|
||||
public function testFullRun()
|
||||
public function testFullRun(): void
|
||||
{
|
||||
$command = $this->getCommand(TestBundleInstallerCommand::class);
|
||||
$commandTester = new CommandTester($command);
|
||||
@@ -53,7 +51,7 @@ class BundleInstallerCommandTest extends KernelTestCase
|
||||
self::assertEquals(0, $commandTester->getStatusCode());
|
||||
}
|
||||
|
||||
public function testMissingMigrationThrowsException()
|
||||
public function testMissingMigrationThrowsException(): void
|
||||
{
|
||||
$command = $this->getCommand(InstallerWithMissingMigrationsCommand::class);
|
||||
$commandTester = new CommandTester($command);
|
||||
@@ -64,7 +62,7 @@ class BundleInstallerCommandTest extends KernelTestCase
|
||||
self::assertEquals(1, $commandTester->getStatusCode());
|
||||
}
|
||||
|
||||
public function testAssetsInstallationFailure()
|
||||
public function testAssetsInstallationFailure(): void
|
||||
{
|
||||
$command = $this->getCommand(AssetsInstallerFailureCommand::class);
|
||||
$commandTester = new CommandTester($command);
|
||||
@@ -75,7 +73,7 @@ class BundleInstallerCommandTest extends KernelTestCase
|
||||
self::assertEquals(1, $commandTester->getStatusCode());
|
||||
}
|
||||
|
||||
public function testInvalidNamespaceWillRaiseException()
|
||||
public function testInvalidNamespaceWillRaiseException(): void
|
||||
{
|
||||
$this->expectException(LogicException::class);
|
||||
$this->expectExceptionMessage('Unsupported namespace given, expected "KimaiPlugin" but received "App". Please overwrite getBundleName() and return the correct bundle name.');
|
||||
@@ -85,7 +83,7 @@ class BundleInstallerCommandTest extends KernelTestCase
|
||||
$commandTester->execute(['command' => $command->getName()]);
|
||||
}
|
||||
|
||||
public function testAssetsInstallIsOk()
|
||||
public function testAssetsInstallIsOk(): void
|
||||
{
|
||||
$command = $this->getCommand(InstallerWithAssetsCommand::class);
|
||||
|
||||
@@ -99,7 +97,7 @@ class BundleInstallerCommandTest extends KernelTestCase
|
||||
self::assertEquals(0, $commandTester->getStatusCode());
|
||||
}
|
||||
|
||||
public function testAssetsInstallReturnsNonZeroExitCode()
|
||||
public function testAssetsInstallReturnsNonZeroExitCode(): void
|
||||
{
|
||||
$command = $this->getCommand(InstallerWithAssetsCommand::class);
|
||||
|
||||
@@ -171,7 +169,7 @@ class AssetsInstallerFailureCommand extends TestBundleInstallerCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function installAssets(SymfonyStyle $io, OutputInterface $output)
|
||||
protected function installAssets(SymfonyStyle $io, OutputInterface $output): void
|
||||
{
|
||||
throw new \Exception('Problem occurred while installing assets.');
|
||||
}
|
||||
|
||||
@@ -172,21 +172,14 @@ class SystemConfigurationTest extends TestCase
|
||||
(new Configuration())->setName('timesheet.foo')->setValue('hello'),
|
||||
]);
|
||||
$this->assertEquals('hello', $sut->find('timesheet.foo'));
|
||||
$this->assertEquals('hello', $sut->offsetGet('timesheet.foo'));
|
||||
$this->assertTrue($sut->has('timesheet.foo'));
|
||||
$this->assertTrue($sut->offsetExists('timesheet.foo'));
|
||||
$this->assertFalse($sut->has('timesheet.yyyyyyyyy'));
|
||||
$this->assertFalse($sut->offsetExists('timesheet.yyyyyyyyy'));
|
||||
$this->assertFalse($sut->has('xxxxxxxx.yyyyyyyyy'));
|
||||
$this->assertFalse($sut->offsetExists('xxxxxxxx.yyyyyyyyy'));
|
||||
$this->assertNull($sut->find('xxxxxxxx.yyyyyyyyy'));
|
||||
$this->assertNull($sut->offsetGet('xxxxxxxx.yyyyyyyyy'));
|
||||
|
||||
$sut->offsetSet('xxxxxxxx.yyyyyyyyy', 'foooo-bar!');
|
||||
$sut->set('xxxxxxxx.yyyyyyyyy', 'foooo-bar!');
|
||||
$this->assertTrue($sut->has('xxxxxxxx.yyyyyyyyy'));
|
||||
$this->assertTrue($sut->offsetExists('xxxxxxxx.yyyyyyyyy'));
|
||||
$this->assertEquals('foooo-bar!', $sut->find('xxxxxxxx.yyyyyyyyy'));
|
||||
$this->assertEquals('foooo-bar!', $sut->offsetGet('xxxxxxxx.yyyyyyyyy'));
|
||||
}
|
||||
|
||||
public function testCalendarWithoutLoader()
|
||||
|
||||
@@ -18,29 +18,29 @@ use App\Tests\Plugin\Fixtures\TestPlugin\TestPlugin;
|
||||
*/
|
||||
class PluginControllerTest extends ControllerBaseTest
|
||||
{
|
||||
public function testIsSecure()
|
||||
public function testIsSecure(): void
|
||||
{
|
||||
$this->assertUrlIsSecured('/admin/plugins/');
|
||||
}
|
||||
|
||||
public function testIsSecureForRole()
|
||||
public function testIsSecureForRole(): void
|
||||
{
|
||||
$this->assertUrlIsSecuredForRole(User::ROLE_ADMIN, '/admin/plugins/');
|
||||
}
|
||||
|
||||
public function testIndexAction()
|
||||
public function testIndexAction(): void
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
|
||||
$this->assertAccessIsGranted($client, '/admin/plugins/');
|
||||
$this->assertCalloutWidgetWithMessage($client, 'You have no plugins installed yet');
|
||||
}
|
||||
|
||||
public function testIndexActionWithInstalledPlugins()
|
||||
public function testIndexActionWithInstalledPlugins(): void
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
|
||||
|
||||
/** @var PluginManager $manager */
|
||||
$manager = self::getContainer()->set(PluginManager::class, new PluginManager([new TestPlugin()]));
|
||||
$manager = new PluginManager([new TestPlugin()]);
|
||||
self::getContainer()->set(PluginManager::class, $manager);
|
||||
|
||||
$this->assertAccessIsGranted($client, '/admin/plugins/');
|
||||
$this->assertHasDataTable($client);
|
||||
|
||||
@@ -30,10 +30,10 @@ class DebugRendererTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getTestModel
|
||||
*/
|
||||
public function testRender(InvoiceModel $model, $expectedRate, $expectedRows, $expectedDescriptions, $expectedUser1, $expectedUser2, $expectedUser3, $hasProject, $metaFields = [])
|
||||
public function testRender(InvoiceModel $model, $expectedRate, $expectedRows, $expectedDescriptions, $expectedUser1, $expectedUser2, $expectedUser3, $hasProject, $metaFields = []): void
|
||||
{
|
||||
$itemHydrator = new class() implements InvoiceItemHydrator {
|
||||
public function setInvoiceModel(InvoiceModel $model)
|
||||
public function setInvoiceModel(InvoiceModel $model): void
|
||||
{
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class DebugRendererTest extends TestCase
|
||||
self::assertEquals('21.03.12', $data['model']['invoice.last']);
|
||||
}
|
||||
|
||||
protected function assertModelStructure(array $model, int $projectCounter = 0, int $activityCounter = 0)
|
||||
protected function assertModelStructure(array $model, int $projectCounter = 0, int $activityCounter = 0): void
|
||||
{
|
||||
$keys = [
|
||||
'invoice.due_date',
|
||||
@@ -243,7 +243,7 @@ class DebugRendererTest extends TestCase
|
||||
$this->assertEquals($keys, $givenKeys);
|
||||
}
|
||||
|
||||
protected function assertEntryStructure(array $model, array $metaFields)
|
||||
protected function assertEntryStructure(array $model, array $metaFields): void
|
||||
{
|
||||
$keys = [
|
||||
'entry.row',
|
||||
|
||||
@@ -26,6 +26,7 @@ use App\Invoice\DefaultInvoiceFormatter;
|
||||
use App\Invoice\InvoiceFormatter;
|
||||
use App\Invoice\InvoiceModel;
|
||||
use App\Invoice\NumberGenerator\DateNumberGenerator;
|
||||
use App\Invoice\NumberGeneratorInterface;
|
||||
use App\Invoice\Renderer\AbstractRenderer;
|
||||
use App\Model\InvoiceDocument;
|
||||
use App\Repository\InvoiceRepository;
|
||||
@@ -255,7 +256,7 @@ trait RendererTestTrait
|
||||
return $model;
|
||||
}
|
||||
|
||||
private function getNumberGeneratorSut()
|
||||
private function getNumberGeneratorSut(): NumberGeneratorInterface
|
||||
{
|
||||
$repository = $this->createMock(InvoiceRepository::class);
|
||||
$repository
|
||||
|
||||
@@ -23,11 +23,11 @@ class TestUserEntity implements UserInterface
|
||||
return 'foo';
|
||||
}
|
||||
|
||||
public function eraseCredentials()
|
||||
public function eraseCredentials(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function getTimeFormat()
|
||||
public function getTimeFormat(): string
|
||||
{
|
||||
return 'H:i';
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
namespace App\Tests\Twig\Runtime;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Tests\Widget\Type\More;
|
||||
use App\Twig\Runtime\WidgetExtension;
|
||||
use App\Widget\Type\More;
|
||||
use App\Widget\WidgetService;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
|
||||
@@ -28,7 +28,10 @@ class DurationValidatorTest extends ConstraintValidatorTestCase
|
||||
return new DurationValidator();
|
||||
}
|
||||
|
||||
public function getValidData()
|
||||
/**
|
||||
* @return array<array<string|int|null>>
|
||||
*/
|
||||
public function getValidData(): array
|
||||
{
|
||||
return [
|
||||
['2h'],
|
||||
@@ -55,7 +58,7 @@ class DurationValidatorTest extends ConstraintValidatorTestCase
|
||||
];
|
||||
}
|
||||
|
||||
public function testConstraintIsInvalid()
|
||||
public function testConstraintIsInvalid(): void
|
||||
{
|
||||
$this->expectException(UnexpectedTypeException::class);
|
||||
|
||||
@@ -65,7 +68,7 @@ class DurationValidatorTest extends ConstraintValidatorTestCase
|
||||
/**
|
||||
* @dataProvider getValidData
|
||||
*/
|
||||
public function testConstraintWithValidData(string|int|null $input)
|
||||
public function testConstraintWithValidData(string|int|null $input): void
|
||||
{
|
||||
$constraint = new Duration();
|
||||
$this->validator->validate($input, $constraint);
|
||||
@@ -75,7 +78,10 @@ class DurationValidatorTest extends ConstraintValidatorTestCase
|
||||
$this->assertNoViolation();
|
||||
}
|
||||
|
||||
public function getInvalidData()
|
||||
/**
|
||||
* @return array<array<string>>
|
||||
*/
|
||||
public function getInvalidData(): array
|
||||
{
|
||||
return [
|
||||
['13-13'],
|
||||
@@ -96,7 +102,7 @@ class DurationValidatorTest extends ConstraintValidatorTestCase
|
||||
/**
|
||||
* @dataProvider getInvalidData
|
||||
*/
|
||||
public function testValidationError(string $input)
|
||||
public function testValidationError(string $input): void
|
||||
{
|
||||
$constraint = new Duration([
|
||||
'message' => 'myMessage',
|
||||
@@ -106,6 +112,7 @@ class DurationValidatorTest extends ConstraintValidatorTestCase
|
||||
|
||||
$this->buildViolation('myMessage')
|
||||
->setParameter('{{ value }}', '"' . $input . '"')
|
||||
->setParameter('{{ pattern }}', '/^-?[0-9]{1,}$|^-?[0-9]{1,}[,.]{1}[0-9]{1,}$|^-?[0-9]{1,}:[0-9]{1,}:[0-9]{1,}$|^-?[0-9]{1,}:[0-9]{1,}$|^[0-9]{1,}[hHmMsS]{1}$|^[0-9]{1,}[hH]{1}[0-9]{1,}[mM]{1}$|^[0-9]{1,}[hHmM]{1}[0-9]{1,}[sS]{1}$|^[0-9]{1,}[mM]{1}[0-9]{1,}[sS]{1}$|^[0-9]{1,}[hH]{1}[0-9]{1,}[mM]{1}[0-9]{1,}[sS]{1}$/')
|
||||
->setCode(Regex::REGEX_FAILED_ERROR)
|
||||
->assertRaised();
|
||||
}
|
||||
@@ -113,7 +120,7 @@ class DurationValidatorTest extends ConstraintValidatorTestCase
|
||||
/**
|
||||
* @dataProvider getInvalidData
|
||||
*/
|
||||
public function testValidationErrorUpperCase(string $input)
|
||||
public function testValidationErrorUpperCase(string $input): void
|
||||
{
|
||||
$input = strtoupper($input);
|
||||
$constraint = new Duration([
|
||||
@@ -124,6 +131,7 @@ class DurationValidatorTest extends ConstraintValidatorTestCase
|
||||
|
||||
$this->buildViolation('myMessage')
|
||||
->setParameter('{{ value }}', '"' . $input . '"')
|
||||
->setParameter('{{ pattern }}', '/^-?[0-9]{1,}$|^-?[0-9]{1,}[,.]{1}[0-9]{1,}$|^-?[0-9]{1,}:[0-9]{1,}:[0-9]{1,}$|^-?[0-9]{1,}:[0-9]{1,}$|^[0-9]{1,}[hHmMsS]{1}$|^[0-9]{1,}[hH]{1}[0-9]{1,}[mM]{1}$|^[0-9]{1,}[hHmM]{1}[0-9]{1,}[sS]{1}$|^[0-9]{1,}[mM]{1}[0-9]{1,}[sS]{1}$|^[0-9]{1,}[hH]{1}[0-9]{1,}[mM]{1}[0-9]{1,}[sS]{1}$/')
|
||||
->setCode(Regex::REGEX_FAILED_ERROR)
|
||||
->assertRaised();
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Widget\Type;
|
||||
|
||||
/**
|
||||
* @covers \App\Widget\Type\AbstractSimpleStatisticChart
|
||||
*/
|
||||
abstract class AbstractSimpleStatisticsWidgetTypeTest extends AbstractWidgetTypeTest
|
||||
{
|
||||
}
|
||||
@@ -20,12 +20,12 @@ abstract class AbstractWidgetTypeTest extends AbstractWidgetTest
|
||||
|
||||
abstract public function getDefaultOptions(): array;
|
||||
|
||||
protected function assertDefaultData(AbstractWidgetType $sut)
|
||||
protected function assertDefaultData(AbstractWidgetType $sut): void
|
||||
{
|
||||
self::assertNull($sut->getData());
|
||||
}
|
||||
|
||||
public function testDefaultData()
|
||||
public function testDefaultData(): void
|
||||
{
|
||||
$sut = $this->createSut();
|
||||
self::assertInstanceOf(AbstractWidgetType::class, $sut);
|
||||
@@ -33,15 +33,7 @@ abstract class AbstractWidgetTypeTest extends AbstractWidgetTest
|
||||
$this->assertDefaultData($sut);
|
||||
}
|
||||
|
||||
public function testFluentInterface()
|
||||
{
|
||||
$sut = $this->createSut();
|
||||
self::assertInstanceOf(AbstractWidgetType::class, $sut->setOptions([]));
|
||||
self::assertInstanceOf(AbstractWidgetType::class, $sut->setId(''));
|
||||
self::assertInstanceOf(AbstractWidgetType::class, $sut->setTitle(''));
|
||||
}
|
||||
|
||||
public function testSetter()
|
||||
public function testSetter(): void
|
||||
{
|
||||
$sut = $this->createSut();
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ use App\Entity\User;
|
||||
use App\Repository\TimesheetRepository;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use App\Widget\Type\AbstractCounterYear;
|
||||
use App\Widget\Type\AbstractWidget;
|
||||
use App\Widget\Type\AbstractWidgetType;
|
||||
use App\Widget\Type\ActiveUsersYear;
|
||||
|
||||
@@ -36,6 +37,11 @@ class ActiveUsersYearTest extends AbstractWidgetTypeTest
|
||||
return $sut;
|
||||
}
|
||||
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0, $sut->getData());
|
||||
}
|
||||
|
||||
public function getDefaultOptions(): array
|
||||
{
|
||||
return [
|
||||
@@ -44,7 +50,7 @@ class ActiveUsersYearTest extends AbstractWidgetTypeTest
|
||||
];
|
||||
}
|
||||
|
||||
public function testSettings()
|
||||
public function testSettings(): void
|
||||
{
|
||||
$sut = $this->createSut();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class AmountMonthTest extends AbstractWidgetTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidget $sut)
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0.0, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class AmountTodayTest extends AbstractWidgetTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidget $sut)
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0.0, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class AmountTotalTest extends AbstractWidgetTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidget $sut)
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0.0, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class AmountWeekTest extends AbstractWidgetTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidget $sut)
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0.0, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class AmountYearTest extends AbstractWidgetTypeTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidgetType $sut)
|
||||
protected function assertDefaultData(AbstractWidgetType $sut): void
|
||||
{
|
||||
self::assertEquals([], $sut->getData());
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Widget\Type;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Repository\TimesheetRepository;
|
||||
use App\Widget\Type\AbstractWidgetType;
|
||||
use App\Widget\Type\Counter;
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
* @covers \App\Widget\Type\Counter
|
||||
* @covers \App\Widget\Type\AbstractSimpleStatisticChart
|
||||
*/
|
||||
class CounterTest extends AbstractSimpleStatisticsWidgetTypeTest
|
||||
{
|
||||
public function createSut(): AbstractWidgetType
|
||||
{
|
||||
$sut = new Counter($this->createMock(TimesheetRepository::class));
|
||||
$sut->setQuery(TimesheetRepository::STATS_QUERY_AMOUNT);
|
||||
|
||||
return $sut;
|
||||
}
|
||||
|
||||
public function testQueryWithUser()
|
||||
{
|
||||
$user = new User();
|
||||
$user->setAlias('foo');
|
||||
|
||||
$repository = $this->createMock(TimesheetRepository::class);
|
||||
$repository->expects($this->once())->method('getStatistic')->willReturnCallback(function (string $type, ?DateTime $begin, ?DateTime $end, ?User $user) {
|
||||
self::assertNull($begin);
|
||||
self::assertNull($end);
|
||||
self::assertNull($user);
|
||||
});
|
||||
$sut = new Counter($repository);
|
||||
$sut->setQuery(TimesheetRepository::STATS_QUERY_AMOUNT);
|
||||
$sut->setUser($user);
|
||||
$sut->getData([]);
|
||||
|
||||
$user = new User();
|
||||
$user->setAlias('bar');
|
||||
|
||||
$repository = $this->createMock(TimesheetRepository::class);
|
||||
$repository->expects($this->once())->method('getStatistic')->willReturnCallback(function (string $type, ?DateTime $begin, ?DateTime $end, ?User $user) {
|
||||
self::assertNull($begin);
|
||||
self::assertNull($end);
|
||||
self::assertNotNull($user);
|
||||
self::assertEquals('bar', $user->getAlias());
|
||||
});
|
||||
$sut = new Counter($repository);
|
||||
$sut->setQuery(TimesheetRepository::STATS_QUERY_AMOUNT);
|
||||
$sut->setUser($user);
|
||||
$sut->setQueryWithUser(true);
|
||||
$sut->getData([]);
|
||||
}
|
||||
|
||||
public function getDefaultOptions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function testTemplateName()
|
||||
{
|
||||
/** @var Counter $sut */
|
||||
$sut = $this->createSut();
|
||||
self::assertEquals('widget/widget-counter.html.twig', $sut->getTemplateName());
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Widget\Type;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Repository\TimesheetRepository;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use App\Widget\Type\AbstractWidgetType;
|
||||
use App\Widget\Type\Counter;
|
||||
use App\Widget\Type\DurationYear;
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
* @covers \App\Widget\Type\DurationYear
|
||||
* @covers \App\Widget\Type\AbstractCounterYear
|
||||
* @covers \App\Widget\Type\AbstractSimpleStatisticChart
|
||||
*/
|
||||
class CounterYearTest extends AbstractSimpleStatisticsWidgetTypeTest
|
||||
{
|
||||
public function createSut(?string $financialYear = null): AbstractWidgetType
|
||||
{
|
||||
$configuration = SystemConfigurationFactory::createStub(['company' => ['financial_year' => $financialYear]]);
|
||||
|
||||
$sut = new DurationYear($this->createMock(TimesheetRepository::class), $configuration);
|
||||
$sut->setQuery(TimesheetRepository::STATS_QUERY_AMOUNT);
|
||||
$sut->setUser(new User());
|
||||
|
||||
return $sut;
|
||||
}
|
||||
|
||||
public function testQueryWithUser()
|
||||
{
|
||||
$user = new User();
|
||||
$user->setAlias('foo');
|
||||
|
||||
$repository = $this->createMock(TimesheetRepository::class);
|
||||
$repository->expects($this->once())->method('getStatistic')->willReturnCallback(function (string $type, ?DateTime $begin, ?DateTime $end, ?User $user) {
|
||||
self::assertNull($begin);
|
||||
self::assertNull($end);
|
||||
self::assertNull($user);
|
||||
});
|
||||
$sut = new Counter($repository);
|
||||
$sut->setQuery(TimesheetRepository::STATS_QUERY_AMOUNT);
|
||||
$sut->setUser($user);
|
||||
$sut->getData([]);
|
||||
|
||||
$user = new User();
|
||||
$user->setAlias('bar');
|
||||
|
||||
$repository = $this->createMock(TimesheetRepository::class);
|
||||
$repository->expects($this->once())->method('getStatistic')->willReturnCallback(function (string $type, ?DateTime $begin, ?DateTime $end, ?User $user) {
|
||||
self::assertNull($begin);
|
||||
self::assertNull($end);
|
||||
self::assertNotNull($user);
|
||||
self::assertEquals('bar', $user->getAlias());
|
||||
});
|
||||
$sut = new Counter($repository);
|
||||
$sut->setQuery(TimesheetRepository::STATS_QUERY_AMOUNT);
|
||||
$sut->setUser($user);
|
||||
$sut->setQueryWithUser(true);
|
||||
$sut->getData([]);
|
||||
}
|
||||
|
||||
public function getDefaultOptions(): array
|
||||
{
|
||||
return ['icon' => 'duration', 'color' => 'yellow'];
|
||||
}
|
||||
|
||||
public function testTemplateName()
|
||||
{
|
||||
/** @var Counter $sut */
|
||||
$sut = $this->createSut();
|
||||
self::assertEquals('widget/widget-counter-duration.html.twig', $sut->getTemplateName());
|
||||
}
|
||||
|
||||
public function testTemplateNameWithFinancialYear()
|
||||
{
|
||||
/** @var Counter $sut */
|
||||
$sut = $this->createSut('2020-01-01');
|
||||
self::assertEquals('widget/widget-counter-duration.html.twig', $sut->getTemplateName());
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ use App\Entity\User;
|
||||
use App\Repository\TimesheetRepository;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use App\Widget\Type\AbstractCounterYear;
|
||||
use App\Widget\Type\AbstractWidget;
|
||||
use App\Widget\Type\AbstractWidgetType;
|
||||
use App\Widget\Type\DurationYear;
|
||||
|
||||
@@ -36,6 +37,11 @@ class DurationYearTest extends AbstractWidgetTypeTest
|
||||
return $sut;
|
||||
}
|
||||
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0, $sut->getData());
|
||||
}
|
||||
|
||||
public function getDefaultOptions(): array
|
||||
{
|
||||
return [
|
||||
|
||||
37
tests/Widget/Type/More.php
Normal file
37
tests/Widget/Type/More.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Widget\Type;
|
||||
|
||||
use App\Widget\Type\AbstractWidgetType;
|
||||
|
||||
class More extends AbstractWidgetType
|
||||
{
|
||||
private mixed $data = null;
|
||||
|
||||
public function setData(mixed $data): self
|
||||
{
|
||||
$this->data = $data;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, string|bool|int|null> $options
|
||||
*/
|
||||
public function getData(array $options = []): mixed
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function getTemplateName(): string
|
||||
{
|
||||
return 'widget/widget-more.html.twig';
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,9 @@
|
||||
namespace App\Tests\Widget\Type;
|
||||
|
||||
use App\Widget\Type\AbstractWidgetType;
|
||||
use App\Widget\Type\More;
|
||||
|
||||
/**
|
||||
* @covers \App\Widget\Type\More
|
||||
* @covers \App\Tests\Widget\Type\More
|
||||
*/
|
||||
class MoreTest extends AbstractWidgetTypeTest
|
||||
{
|
||||
@@ -27,13 +26,13 @@ class MoreTest extends AbstractWidgetTypeTest
|
||||
return [];
|
||||
}
|
||||
|
||||
public function testTemplateName()
|
||||
public function testTemplateName(): void
|
||||
{
|
||||
$sut = new More();
|
||||
self::assertEquals('widget/widget-more.html.twig', $sut->getTemplateName());
|
||||
}
|
||||
|
||||
public function testData()
|
||||
public function testData(): void
|
||||
{
|
||||
$sut = $this->createSut();
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class TotalsActivityTest extends AbstractWidgetTest
|
||||
];
|
||||
}
|
||||
|
||||
protected function assertDefaultData(AbstractWidgetType $sut)
|
||||
protected function assertDefaultData(AbstractWidgetType $sut): void
|
||||
{
|
||||
self::assertEquals(1, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class TotalsCustomerTest extends AbstractWidgetTest
|
||||
];
|
||||
}
|
||||
|
||||
protected function assertDefaultData(AbstractWidgetType $sut)
|
||||
protected function assertDefaultData(AbstractWidgetType $sut): void
|
||||
{
|
||||
self::assertEquals(1, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class TotalsProjectTest extends AbstractWidgetTest
|
||||
];
|
||||
}
|
||||
|
||||
protected function assertDefaultData(AbstractWidgetType $sut)
|
||||
protected function assertDefaultData(AbstractWidgetType $sut): void
|
||||
{
|
||||
self::assertEquals(1, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class TotalsUserTest extends AbstractWidgetTest
|
||||
];
|
||||
}
|
||||
|
||||
protected function assertDefaultData(AbstractWidgetType $sut)
|
||||
protected function assertDefaultData(AbstractWidgetType $sut): void
|
||||
{
|
||||
self::assertEquals(1, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class UserAmountMonthTest extends AbstractWidgetTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidget $sut)
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0.0, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class UserAmountTodayTest extends AbstractWidgetTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidget $sut)
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0.0, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class UserAmountTotalTest extends AbstractWidgetTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidget $sut)
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0.0, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class UserAmountWeekTest extends AbstractWidgetTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidget $sut)
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0.0, $sut->getData());
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
*/
|
||||
class UserAmountYearTest extends AbstractWidgetTypeTest
|
||||
{
|
||||
protected function assertDefaultData(AbstractWidgetType $sut)
|
||||
protected function assertDefaultData(AbstractWidgetType $sut): void
|
||||
{
|
||||
self::assertEquals([], $sut->getData());
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ use App\Entity\User;
|
||||
use App\Repository\TimesheetRepository;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use App\Widget\Type\AbstractCounterYear;
|
||||
use App\Widget\Type\AbstractWidget;
|
||||
use App\Widget\Type\AbstractWidgetType;
|
||||
use App\Widget\Type\UserDurationYear;
|
||||
|
||||
@@ -36,6 +37,11 @@ class UserDurationYearTest extends AbstractWidgetTypeTest
|
||||
return $sut;
|
||||
}
|
||||
|
||||
protected function assertDefaultData(AbstractWidget $sut): void
|
||||
{
|
||||
self::assertEquals(0, $sut->getData());
|
||||
}
|
||||
|
||||
public function getDefaultOptions(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace App\Tests\Widget;
|
||||
|
||||
use App\Widget\Type\More;
|
||||
use App\Tests\Widget\Type\More;
|
||||
use App\Widget\WidgetService;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
||||
@@ -1342,41 +1342,6 @@ parameters:
|
||||
count: 1
|
||||
path: Command/ActivateUserCommandTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Command\\\\AssetsInstallerFailureCommand\\:\\:installAssets\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Command/BundleInstallerCommandTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Command\\\\BundleInstallerCommandTest\\:\\:testAssetsInstallIsOk\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Command/BundleInstallerCommandTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Command\\\\BundleInstallerCommandTest\\:\\:testAssetsInstallReturnsNonZeroExitCode\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Command/BundleInstallerCommandTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Command\\\\BundleInstallerCommandTest\\:\\:testAssetsInstallationFailure\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Command/BundleInstallerCommandTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Command\\\\BundleInstallerCommandTest\\:\\:testFullRun\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Command/BundleInstallerCommandTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Command\\\\BundleInstallerCommandTest\\:\\:testInvalidNamespaceWillRaiseException\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Command/BundleInstallerCommandTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Command\\\\BundleInstallerCommandTest\\:\\:testMissingMigrationThrowsException\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Command/BundleInstallerCommandTest.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$command of method Symfony\\\\Bundle\\\\FrameworkBundle\\\\Console\\\\Application\\:\\:add\\(\\) expects Symfony\\\\Component\\\\Console\\\\Command\\\\Command, object given\\.$#"
|
||||
count: 1
|
||||
@@ -2762,26 +2727,6 @@ parameters:
|
||||
count: 1
|
||||
path: Controller/PermissionControllerTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Controller\\\\PluginControllerTest\\:\\:testIndexAction\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Controller/PluginControllerTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Controller\\\\PluginControllerTest\\:\\:testIndexActionWithInstalledPlugins\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Controller/PluginControllerTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Controller\\\\PluginControllerTest\\:\\:testIsSecure\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Controller/PluginControllerTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Controller\\\\PluginControllerTest\\:\\:testIsSecureForRole\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Controller/PluginControllerTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Controller\\\\ProfileControllerTest\\:\\:testEditActionTabs\\(\\) has parameter \\$role with no type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6162,11 +6107,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceItemDefaultHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceItemDefaultHydratorTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceItemDefaultHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceItemDefaultHydratorTest\\:\\:testHydrate\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6187,11 +6127,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelActivityHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelActivityHydratorTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelActivityHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelActivityHydratorTest\\:\\:testHydrate\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6207,11 +6142,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelCustomerHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelCustomerHydratorTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelCustomerHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelDefaultHydratorTest\\:\\:assertModelStructure\\(\\) has parameter \\$model with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -6222,11 +6152,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelDefaultHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelDefaultHydratorTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelDefaultHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelProjectHydratorTest\\:\\:assertModelStructure\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6242,11 +6167,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelProjectHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelProjectHydratorTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelProjectHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelProjectHydratorTest\\:\\:testHydrate\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6267,11 +6187,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelUserHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelUserHydratorTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Hydrator/InvoiceModelUserHydratorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Hydrator\\\\InvoiceModelUserHydratorTest\\:\\:testHydrate\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6372,11 +6287,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DebugRendererTest\\:\\:assertEntryStructure\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DebugRendererTest\\:\\:assertEntryStructure\\(\\) has parameter \\$metaFields with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -6387,11 +6297,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DebugRendererTest\\:\\:assertModelStructure\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DebugRendererTest\\:\\:assertModelStructure\\(\\) has parameter \\$model with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -6402,21 +6307,11 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DebugRendererTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DebugRendererTest\\:\\:getTestModel\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DebugRendererTest\\:\\:testRender\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DebugRendererTest\\:\\:testRender\\(\\) has parameter \\$expectedDescriptions with no type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6462,11 +6357,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method class@anonymous/Invoice/Renderer/DebugRendererTest\\.php\\:35\\:\\:setInvoiceModel\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/DebugRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method class@anonymous/Invoice/Renderer/DebugRendererTest\\.php\\:47\\:\\:hydrate\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -6497,11 +6387,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/DocxRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DocxRendererTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/DocxRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\DocxRendererTest\\:\\:testRender\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6517,11 +6402,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/OdsRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\OdsRendererTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/OdsRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\OdsRendererTest\\:\\:getTestModel\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6577,11 +6457,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/PdfRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\PdfRendererTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/PdfRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\PdfRendererTest\\:\\:testRender\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6617,11 +6492,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/TwigRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\TwigRendererTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/TwigRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\TwigRendererTest\\:\\:testRender\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -6647,11 +6517,6 @@ parameters:
|
||||
count: 1
|
||||
path: Invoice/Renderer/XlsxRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\XlsxRendererTest\\:\\:getNumberGeneratorSut\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Invoice/Renderer/XlsxRendererTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Invoice\\\\Renderer\\\\XlsxRendererTest\\:\\:getTestModel\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -7932,16 +7797,6 @@ parameters:
|
||||
count: 1
|
||||
path: Security/SessionHandlerTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Security\\\\TestUserEntity\\:\\:eraseCredentials\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Security/TestUserEntity.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Security\\\\TestUserEntity\\:\\:getTimeFormat\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Security/TestUserEntity.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Security\\\\UserCheckerTest\\:\\:testCheckPostAuthReturnsOnUnknownUserClass\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -9617,36 +9472,6 @@ parameters:
|
||||
count: 1
|
||||
path: Validator/Constraints/DateTimeFormatValidatorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Validator\\\\Constraints\\\\DurationValidatorTest\\:\\:getInvalidData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Validator/Constraints/DurationValidatorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Validator\\\\Constraints\\\\DurationValidatorTest\\:\\:getValidData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Validator/Constraints/DurationValidatorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Validator\\\\Constraints\\\\DurationValidatorTest\\:\\:testConstraintIsInvalid\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Validator/Constraints/DurationValidatorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Validator\\\\Constraints\\\\DurationValidatorTest\\:\\:testConstraintWithValidData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Validator/Constraints/DurationValidatorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Validator\\\\Constraints\\\\DurationValidatorTest\\:\\:testValidationError\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Validator/Constraints/DurationValidatorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Validator\\\\Constraints\\\\DurationValidatorTest\\:\\:testValidationErrorUpperCase\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Validator/Constraints/DurationValidatorTest.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function strtoupper expects string, int\\|string given\\.$#"
|
||||
count: 1
|
||||
@@ -10592,46 +10417,16 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/AbstractWidgetTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AbstractWidgetTypeTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AbstractWidgetTypeTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AbstractWidgetTypeTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AbstractWidgetTypeTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AbstractWidgetTypeTest\\:\\:testDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AbstractWidgetTypeTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AbstractWidgetTypeTest\\:\\:testFluentInterface\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AbstractWidgetTypeTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AbstractWidgetTypeTest\\:\\:testSetter\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AbstractWidgetTypeTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\ActiveUsersYearTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/ActiveUsersYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\ActiveUsersYearTest\\:\\:testSettings\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/ActiveUsersYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountMonthTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AmountMonthTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountMonthTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10642,11 +10437,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/AmountMonthTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountTodayTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AmountTodayTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountTodayTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10657,11 +10447,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/AmountTodayTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountTotalTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AmountTotalTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountTotalTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10672,11 +10457,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/AmountTotalTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountWeekTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AmountWeekTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountWeekTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10687,11 +10467,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/AmountWeekTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountYearTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/AmountYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\AmountYearTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10702,41 +10477,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/AmountYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\CounterTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/CounterTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\CounterTest\\:\\:testQueryWithUser\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/CounterTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\CounterTest\\:\\:testTemplateName\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/CounterTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\CounterYearTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/CounterYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\CounterYearTest\\:\\:testQueryWithUser\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/CounterYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\CounterYearTest\\:\\:testTemplateName\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/CounterYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\CounterYearTest\\:\\:testTemplateNameWithFinancialYear\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/CounterYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\DailyWorkingTimeChartTest\\:\\:testDefaultValues\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
@@ -10782,16 +10522,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/MoreTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\MoreTest\\:\\:testData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/MoreTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\MoreTest\\:\\:testTemplateName\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/MoreTest.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'financialBegin' on mixed\\.$#"
|
||||
count: 2
|
||||
@@ -10832,11 +10562,6 @@ parameters:
|
||||
count: 2
|
||||
path: Widget/Type/PaginatedWorkingTimeChartTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\TotalsActivityTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/TotalsActivityTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\TotalsActivityTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10847,11 +10572,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/TotalsActivityTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\TotalsCustomerTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/TotalsCustomerTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\TotalsCustomerTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10862,11 +10582,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/TotalsCustomerTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\TotalsProjectTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/TotalsProjectTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\TotalsProjectTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10877,11 +10592,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/TotalsProjectTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\TotalsUserTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/TotalsUserTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\TotalsUserTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10892,11 +10602,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/TotalsUserTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountMonthTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountMonthTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountMonthTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10907,11 +10612,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountMonthTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountTodayTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountTodayTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountTodayTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10922,11 +10622,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountTodayTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountTotalTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountTotalTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountTotalTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10937,11 +10632,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountTotalTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountWeekTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountWeekTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountWeekTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -10952,11 +10642,6 @@ parameters:
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountWeekTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountYearTest\\:\\:assertDefaultData\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: Widget/Type/UserAmountYearTest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Tests\\\\Widget\\\\Type\\\\UserAmountYearTest\\:\\:getDefaultOptions\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
|
||||
Reference in New Issue
Block a user