Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ public function onEntireEntityUpdated($oldValue)
self::assertNull($object->string);
})
;
}, 80100];
}];

yield 'Enum: (de)hydrates correctly' => [function () {
return HydrationTest::create(new class {
Expand All @@ -841,7 +841,7 @@ public function onEntireEntityUpdated($oldValue)
self::assertSame('active', $object->string->value);
})
;
}, 80100];
}];

yield 'Enum: writable enums can be changed' => [function () {
return HydrationTest::create(new class {
Expand All @@ -854,7 +854,7 @@ public function onEntireEntityUpdated($oldValue)
self::assertSame(1, $object->int->value);
})
;
}, 80100];
}];

yield 'Enum: null-like enum values are handled correctly' => [function () {
return HydrationTest::create(new class {
Expand Down Expand Up @@ -884,7 +884,7 @@ public function onEntireEntityUpdated($oldValue)
self::assertSame(EmptyStringEnum::EMPTY, $object->emptyString);
})
;
}, 80100];
}];

yield 'Enum: nullable enum with invalid value sets to null' => [function () {
return HydrationTest::create(new class {
Expand All @@ -898,7 +898,7 @@ public function onEntireEntityUpdated($oldValue)
self::assertNull($object->int);
})
;
}, 80100];
}];

yield 'Object: (de)hydrates DTO correctly' => [function () {
return HydrationTest::create(new class {
Expand Down Expand Up @@ -1612,7 +1612,7 @@ public static function provideInvalidHydrationTests(): iterable
// non-nullable change is rejected (1=LOW)
self::assertSame(1, $object->nonNullableInt->value);
});
}, 80100];
}];

yield 'writable_path_with_type_problem_ignored' => [function () {
return HydrationTest::create(new class {
Expand Down
10 changes: 0 additions & 10 deletions src/TwigComponent/tests/Unit/ComponentAttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ public function testCanAddStimulusControllerIfNoneAlreadyPresent()

public function testCanAddStimulusControllerViaStimulusAttributes()
{
// if PHP less than 8.1, skip
if (version_compare(\PHP_VERSION, '8.1.0', '<')) {
$this->markTestSkipped('PHP 8.1+ required');
}

$attributes = new ComponentAttributes([
'class' => 'foo',
'data-controller' => 'live',
Expand All @@ -167,11 +162,6 @@ public function testCanAddStimulusControllerViaStimulusAttributes()

public function testCanAddStimulusActionViaStimulusAttributes()
{
// if PHP less than 8.1, skip
if (version_compare(\PHP_VERSION, '8.1.0', '<')) {
$this->markTestSkipped('PHP 8.1+ required');
}

$attributes = new ComponentAttributes([
'class' => 'foo',
'data-action' => 'live#foo',
Expand Down
Loading