Release 2.12 (#4609)
This commit is contained in:
@@ -20,7 +20,7 @@ use Symfony\Component\Form\Test\TypeTestCase;
|
||||
*/
|
||||
class ActivityEditFormTest extends TypeTestCase
|
||||
{
|
||||
public function testWithGlobalNewActivity()
|
||||
public function testWithGlobalNewActivity(): void
|
||||
{
|
||||
$model = new Activity();
|
||||
$form = $this->factory->createBuilder(ActivityEditForm::class, $model);
|
||||
@@ -40,7 +40,7 @@ class ActivityEditFormTest extends TypeTestCase
|
||||
self::assertFalse($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithGlobalNewActivityAndOptionsBudget()
|
||||
public function testWithGlobalNewActivityAndOptionsBudget(): void
|
||||
{
|
||||
$model = new Activity();
|
||||
$form = $this->factory->createBuilder(ActivityEditForm::class, $model, [
|
||||
@@ -51,7 +51,7 @@ class ActivityEditFormTest extends TypeTestCase
|
||||
self::assertTrue($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithGlobalNewActivityAndOptionsTimeBudget()
|
||||
public function testWithGlobalNewActivityAndOptionsTimeBudget(): void
|
||||
{
|
||||
$model = new Activity();
|
||||
$form = $this->factory->createBuilder(ActivityEditForm::class, $model, [
|
||||
@@ -62,7 +62,7 @@ class ActivityEditFormTest extends TypeTestCase
|
||||
self::assertTrue($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithGlobalNewActivityAndOptionsAllBudget()
|
||||
public function testWithGlobalNewActivityAndOptionsAllBudget(): void
|
||||
{
|
||||
$model = new Activity();
|
||||
$form = $this->factory->createBuilder(ActivityEditForm::class, $model, [
|
||||
@@ -74,7 +74,7 @@ class ActivityEditFormTest extends TypeTestCase
|
||||
self::assertTrue($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithGlobalExistingActivityAndOptions()
|
||||
public function testWithGlobalExistingActivityAndOptions(): void
|
||||
{
|
||||
$model = $this->createMock(Activity::class);
|
||||
$model->expects($this->once())->method('getId')->willReturn(1);
|
||||
@@ -87,7 +87,7 @@ class ActivityEditFormTest extends TypeTestCase
|
||||
self::assertFalse($form->has('timeBudget'));
|
||||
}
|
||||
|
||||
public function testWithNonGlobalExistingActivityAndOptions()
|
||||
public function testWithNonGlobalExistingActivityAndOptions(): void
|
||||
{
|
||||
$project = new Project();
|
||||
$customer = new Customer('foo');
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\Form\Test\TypeTestCase;
|
||||
*/
|
||||
class CustomerEditFormTest extends TypeTestCase
|
||||
{
|
||||
public function testWithNewProject()
|
||||
public function testWithNewProject(): void
|
||||
{
|
||||
$model = new Customer('foo');
|
||||
$form = $this->factory->createBuilder(CustomerEditForm::class, $model);
|
||||
@@ -37,7 +37,7 @@ class CustomerEditFormTest extends TypeTestCase
|
||||
self::assertFalse($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithBudget()
|
||||
public function testWithBudget(): void
|
||||
{
|
||||
$model = new Customer('foo');
|
||||
$form = $this->factory->createBuilder(CustomerEditForm::class, $model, [
|
||||
@@ -48,7 +48,7 @@ class CustomerEditFormTest extends TypeTestCase
|
||||
self::assertTrue($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithTimeBudget()
|
||||
public function testWithTimeBudget(): void
|
||||
{
|
||||
$model = new Customer('foo');
|
||||
$form = $this->factory->createBuilder(CustomerEditForm::class, $model, [
|
||||
@@ -59,7 +59,7 @@ class CustomerEditFormTest extends TypeTestCase
|
||||
self::assertTrue($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithBudgetAndTimeBudget()
|
||||
public function testWithBudgetAndTimeBudget(): void
|
||||
{
|
||||
$model = new Customer('foo');
|
||||
$form = $this->factory->createBuilder(CustomerEditForm::class, $model, [
|
||||
|
||||
@@ -49,7 +49,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getValidTestDataTransform
|
||||
*/
|
||||
public function testTransform($expected, $transform)
|
||||
public function testTransform($expected, $transform): void
|
||||
{
|
||||
$this->assertEquals($expected, $this->sut->transform($transform));
|
||||
}
|
||||
@@ -57,7 +57,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getInvalidTestDataTransform
|
||||
*/
|
||||
public function testInvalidTransformThrowsException($transform)
|
||||
public function testInvalidTransformThrowsException($transform): void
|
||||
{
|
||||
$this->expectException(TransformationFailedException::class);
|
||||
|
||||
@@ -89,7 +89,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getValidTestDataReverseTransform
|
||||
*/
|
||||
public function testReverseTransform($transform, $expected)
|
||||
public function testReverseTransform($transform, $expected): void
|
||||
{
|
||||
$this->assertEquals($expected, $this->sut->reverseTransform($transform));
|
||||
}
|
||||
@@ -97,7 +97,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getInvalidTestDataReverseTransform
|
||||
*/
|
||||
public function testInvalidReverseTransformThrowsException($transform)
|
||||
public function testInvalidReverseTransformThrowsException($transform): void
|
||||
{
|
||||
$this->expectException(TransformationFailedException::class);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class SearchTermTransformerTest extends TestCase
|
||||
{
|
||||
public function testTransform()
|
||||
public function testTransform(): void
|
||||
{
|
||||
$sut = new SearchTermTransformer();
|
||||
|
||||
@@ -34,7 +34,7 @@ class SearchTermTransformerTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testReverseTransform()
|
||||
public function testReverseTransform(): void
|
||||
{
|
||||
$sut = new SearchTermTransformer();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class TagArrayToStringTransformerTest extends TestCase
|
||||
{
|
||||
public function testTransform()
|
||||
public function testTransform(): void
|
||||
{
|
||||
$results = [
|
||||
(new Tag())->setName('foo'),
|
||||
@@ -38,7 +38,7 @@ class TagArrayToStringTransformerTest extends TestCase
|
||||
$this->assertEquals('foo, bar', $actual);
|
||||
}
|
||||
|
||||
public function testReverseTransform()
|
||||
public function testReverseTransform(): void
|
||||
{
|
||||
$results = [
|
||||
(new Tag())->setName('foo'),
|
||||
|
||||
@@ -20,12 +20,12 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
class DocumentationLinkExtensionTest extends TestCase
|
||||
{
|
||||
public function testExtendedTypes()
|
||||
public function testExtendedTypes(): void
|
||||
{
|
||||
self::assertEquals([FormType::class], DocumentationLinkExtension::getExtendedTypes());
|
||||
}
|
||||
|
||||
public function testConfigureOptions()
|
||||
public function testConfigureOptions(): void
|
||||
{
|
||||
$resolver = new OptionsResolver();
|
||||
$sut = new DocumentationLinkExtension();
|
||||
|
||||
@@ -20,12 +20,12 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
class EnhancedChoiceTypeExtensionTest extends TestCase
|
||||
{
|
||||
public function testExtendedTypes()
|
||||
public function testExtendedTypes(): void
|
||||
{
|
||||
self::assertEquals([EntityType::class, ChoiceType::class], EnhancedChoiceTypeExtension::getExtendedTypes());
|
||||
}
|
||||
|
||||
public function testConfigureOptions()
|
||||
public function testConfigureOptions(): void
|
||||
{
|
||||
$resolver = new OptionsResolver();
|
||||
$sut = new EnhancedChoiceTypeExtension();
|
||||
|
||||
@@ -20,12 +20,12 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
class IconExtensionTest extends TestCase
|
||||
{
|
||||
public function testExtendedTypes()
|
||||
public function testExtendedTypes(): void
|
||||
{
|
||||
self::assertEquals([TextType::class], IconExtension::getExtendedTypes());
|
||||
}
|
||||
|
||||
public function testConfigureOptions()
|
||||
public function testConfigureOptions(): void
|
||||
{
|
||||
$resolver = new OptionsResolver();
|
||||
$sut = new IconExtension();
|
||||
|
||||
@@ -19,14 +19,14 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class SystemConfigurationTest extends TestCase
|
||||
{
|
||||
public function testDefaultValues()
|
||||
public function testDefaultValues(): void
|
||||
{
|
||||
$sut = new SystemConfiguration();
|
||||
self::assertNull($sut->getSection());
|
||||
self::assertEquals([], $sut->getConfiguration());
|
||||
}
|
||||
|
||||
public function testSetterAndGetter()
|
||||
public function testSetterAndGetter(): void
|
||||
{
|
||||
$sut = new SystemConfiguration('foo');
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class MultiUpdateTableDTOTest extends TestCase
|
||||
{
|
||||
public function testDefaultValues()
|
||||
public function testDefaultValues(): void
|
||||
{
|
||||
$sut = new MultiUpdateTableDTO();
|
||||
self::assertEmpty($sut->getEntities());
|
||||
@@ -31,7 +31,7 @@ class MultiUpdateTableDTOTest extends TestCase
|
||||
self::assertFalse($sut->hasAction());
|
||||
}
|
||||
|
||||
public function testSetterAndGetter()
|
||||
public function testSetterAndGetter(): void
|
||||
{
|
||||
$sut = new MultiUpdateTableDTO();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class TimesheetMultiUpdateDTOTest extends TestCase
|
||||
{
|
||||
public function testDefaultValues()
|
||||
public function testDefaultValues(): void
|
||||
{
|
||||
$sut = new TimesheetMultiUpdateDTO();
|
||||
self::assertEmpty($sut->getEntities());
|
||||
@@ -46,7 +46,7 @@ class TimesheetMultiUpdateDTOTest extends TestCase
|
||||
self::assertEquals([], $sut->getUpdateMeta());
|
||||
}
|
||||
|
||||
public function testSetterAndGetter()
|
||||
public function testSetterAndGetter(): void
|
||||
{
|
||||
$sut = new TimesheetMultiUpdateDTO();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\Form\Test\TypeTestCase;
|
||||
*/
|
||||
class ProjectEditFormTest extends TypeTestCase
|
||||
{
|
||||
public function testWithNewProject()
|
||||
public function testWithNewProject(): void
|
||||
{
|
||||
$model = new Project();
|
||||
$form = $this->factory->createBuilder(ProjectEditForm::class, $model);
|
||||
@@ -38,7 +38,7 @@ class ProjectEditFormTest extends TypeTestCase
|
||||
self::assertFalse($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithBudget()
|
||||
public function testWithBudget(): void
|
||||
{
|
||||
$model = new Project();
|
||||
$form = $this->factory->createBuilder(ProjectEditForm::class, $model, [
|
||||
@@ -49,7 +49,7 @@ class ProjectEditFormTest extends TypeTestCase
|
||||
self::assertTrue($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithTimeBudget()
|
||||
public function testWithTimeBudget(): void
|
||||
{
|
||||
$model = new Project();
|
||||
$form = $this->factory->createBuilder(ProjectEditForm::class, $model, [
|
||||
@@ -60,7 +60,7 @@ class ProjectEditFormTest extends TypeTestCase
|
||||
self::assertTrue($form->has('budgetType'));
|
||||
}
|
||||
|
||||
public function testWithBudgetAndTimeBudget()
|
||||
public function testWithBudgetAndTimeBudget(): void
|
||||
{
|
||||
$model = new Project();
|
||||
$form = $this->factory->createBuilder(ProjectEditForm::class, $model, [
|
||||
|
||||
@@ -29,7 +29,7 @@ class DurationTypeTest extends TypeTestCase
|
||||
/**
|
||||
* @dataProvider getTestData
|
||||
*/
|
||||
public function testSubmitValidData($value, $expected)
|
||||
public function testSubmitValidData($value, $expected): void
|
||||
{
|
||||
$data = ['duration' => $value];
|
||||
$model = new TypeTestModel(['duration' => 3600]);
|
||||
@@ -48,7 +48,7 @@ class DurationTypeTest extends TypeTestCase
|
||||
$this->assertEquals($expected, $model);
|
||||
}
|
||||
|
||||
public function testPresetPopulatesView()
|
||||
public function testPresetPopulatesView(): void
|
||||
{
|
||||
$view = $this->factory->create(DurationType::class, 3600, [
|
||||
'preset_minutes' => 15,
|
||||
@@ -61,7 +61,7 @@ class DurationTypeTest extends TypeTestCase
|
||||
self::assertEquals('4:45', $view->vars['duration_presets'][18]);
|
||||
}
|
||||
|
||||
public function testPresetsAreNotGeneratedOnMissingHours()
|
||||
public function testPresetsAreNotGeneratedOnMissingHours(): void
|
||||
{
|
||||
$view = $this->factory->create(DurationType::class, 3600, [
|
||||
'preset_minutes' => 5,
|
||||
@@ -70,7 +70,7 @@ class DurationTypeTest extends TypeTestCase
|
||||
self::assertArrayNotHasKey('duration_presets', $view->vars);
|
||||
}
|
||||
|
||||
public function testPresetsAreNotGeneratedOnMissingMinutes()
|
||||
public function testPresetsAreNotGeneratedOnMissingMinutes(): void
|
||||
{
|
||||
$view = $this->factory->create(DurationType::class, 3600, [
|
||||
'preset_hours' => 5,
|
||||
@@ -79,7 +79,7 @@ class DurationTypeTest extends TypeTestCase
|
||||
self::assertArrayNotHasKey('duration_presets', $view->vars);
|
||||
}
|
||||
|
||||
public function testPresetsAreNotGeneratedOnNegativeMinutes()
|
||||
public function testPresetsAreNotGeneratedOnNegativeMinutes(): void
|
||||
{
|
||||
$view = $this->factory->create(DurationType::class, 3600, [
|
||||
'preset_minutes' => -1,
|
||||
@@ -89,7 +89,7 @@ class DurationTypeTest extends TypeTestCase
|
||||
self::assertArrayNotHasKey('duration_presets', $view->vars);
|
||||
}
|
||||
|
||||
public function testPresetsAreNotGeneratedOnNegativeHours()
|
||||
public function testPresetsAreNotGeneratedOnNegativeHours(): void
|
||||
{
|
||||
$view = $this->factory->create(DurationType::class, 3600, [
|
||||
'preset_minutes' => 5,
|
||||
@@ -99,7 +99,7 @@ class DurationTypeTest extends TypeTestCase
|
||||
self::assertArrayNotHasKey('duration_presets', $view->vars);
|
||||
}
|
||||
|
||||
public function testHasDurationInputClass()
|
||||
public function testHasDurationInputClass(): void
|
||||
{
|
||||
$view = $this->factory->create(DurationType::class, 3600, [
|
||||
'attr' => ['class' => 'testing']
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\Form\Test\TypeTestCase;
|
||||
*/
|
||||
class MinuteIncrementTypeTest extends TypeTestCase
|
||||
{
|
||||
public function testSubmitValidData()
|
||||
public function testSubmitValidData(): void
|
||||
{
|
||||
$data = ['increment' => 4];
|
||||
$model = new TypeTestModel(['increment' => 5]);
|
||||
@@ -37,7 +37,7 @@ class MinuteIncrementTypeTest extends TypeTestCase
|
||||
$this->assertEquals($expected, $model);
|
||||
}
|
||||
|
||||
public function testPresetPopulatesView()
|
||||
public function testPresetPopulatesView(): void
|
||||
{
|
||||
$view = $this->factory->create(MinuteIncrementType::class, 3600, [])->createView();
|
||||
self::assertArrayHasKey('choices', $view->vars);
|
||||
|
||||
@@ -45,7 +45,7 @@ class QuickEntryTimesheetTypeTest extends TypeTestCase
|
||||
/**
|
||||
* @dataProvider getTestData
|
||||
*/
|
||||
public function testSubmitValidData($value, $expectedDuration)
|
||||
public function testSubmitValidData($value, $expectedDuration): void
|
||||
{
|
||||
$data = ['duration' => $value];
|
||||
|
||||
@@ -72,7 +72,7 @@ class QuickEntryTimesheetTypeTest extends TypeTestCase
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function testPresetPopulatesView()
|
||||
public function testPresetPopulatesView(): void
|
||||
{
|
||||
$view = $this->factory->create(QuickEntryTimesheetType::class, $this->createDefaultModel(), [
|
||||
'duration_minutes' => 15,
|
||||
@@ -87,7 +87,7 @@ class QuickEntryTimesheetTypeTest extends TypeTestCase
|
||||
self::assertEquals('4:45', $vars['duration_presets'][18]);
|
||||
}
|
||||
|
||||
public function testPresetsAreNotGeneratedOnMissingHours()
|
||||
public function testPresetsAreNotGeneratedOnMissingHours(): void
|
||||
{
|
||||
$view = $this->factory->create(QuickEntryTimesheetType::class, $this->createDefaultModel())->createView();
|
||||
|
||||
@@ -96,7 +96,7 @@ class QuickEntryTimesheetTypeTest extends TypeTestCase
|
||||
self::assertArrayNotHasKey('duration_presets', $vars);
|
||||
}
|
||||
|
||||
public function testPresetsAreNotGeneratedOnMissingMinutes()
|
||||
public function testPresetsAreNotGeneratedOnMissingMinutes(): void
|
||||
{
|
||||
$view = $this->factory->create(QuickEntryTimesheetType::class, $this->createDefaultModel(), [
|
||||
'duration_hours' => 5,
|
||||
@@ -107,7 +107,7 @@ class QuickEntryTimesheetTypeTest extends TypeTestCase
|
||||
self::assertArrayNotHasKey('duration_presets', $vars);
|
||||
}
|
||||
|
||||
public function testPresetsAreNotGeneratedOnNegativeMinutes()
|
||||
public function testPresetsAreNotGeneratedOnNegativeMinutes(): void
|
||||
{
|
||||
$view = $this->factory->create(QuickEntryTimesheetType::class, $this->createDefaultModel(), [
|
||||
'duration_minutes' => -1,
|
||||
@@ -119,7 +119,7 @@ class QuickEntryTimesheetTypeTest extends TypeTestCase
|
||||
self::assertArrayNotHasKey('duration_presets', $vars);
|
||||
}
|
||||
|
||||
public function testPresetsAreNotGeneratedOnNegativeHours()
|
||||
public function testPresetsAreNotGeneratedOnNegativeHours(): void
|
||||
{
|
||||
$view = $this->factory->create(QuickEntryTimesheetType::class, $this->createDefaultModel(), [
|
||||
'duration_minutes' => 5,
|
||||
|
||||
Reference in New Issue
Block a user