Skip to content
Snippets Groups Projects
Unverified Commit f6658ba9 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3199428 by clayfreeman, quietone: Remove testing the internals of...

Issue #3199428 by clayfreeman, quietone: Remove testing the internals of DependencySerializationTrait from LocaleTranslationTest
parent dcad9433
No related branches found
No related tags found
No related merge requests found
......@@ -29,20 +29,6 @@ public function testSerializable() {
$this->assertNotNull($translation);
$unserialized = unserialize(serialize($translation));
$this->assertInstanceOf(LocaleTranslation::class, $unserialized);
// Ensure that all properties on the unserialized object match the original.
$translation_reflection = new \ReflectionObject($translation);
$unserialized_reflection = new \ReflectionObject($unserialized);
// Ignore the '_serviceIds' property in the comparison.
$properties = array_filter($translation_reflection->getProperties(), function ($value) {
return $value->getName() !== '_serviceIds';
});
foreach ($properties as $value) {
$value->setAccessible(TRUE);
$unserialized_property = $unserialized_reflection->getProperty($value->getName());
$unserialized_property->setAccessible(TRUE);
$this->assertEquals($unserialized_property->getValue($unserialized), $value->getValue($translation));
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment