diff --git a/src/Container/SerializationPreparerStackFactory.php b/src/Container/SerializationPreparerStackFactory.php new file mode 100644 index 0000000..0d0e13d --- /dev/null +++ b/src/Container/SerializationPreparerStackFactory.php @@ -0,0 +1,26 @@ +push($container->get(DefaultPreparer::class)); + $preparer->push($container->get(SerializationPreparer::class)); + $preparer->push($container->get(CommonPreparer::class)); + + return $preparer; + } +} diff --git a/test/Container/SerializationPreparerStackFactoryTest.php b/test/Container/SerializationPreparerStackFactoryTest.php new file mode 100644 index 0000000..dd839a6 --- /dev/null +++ b/test/Container/SerializationPreparerStackFactoryTest.php @@ -0,0 +1,23 @@ +container->setFactory(PreparerStack::class, SerializationPreparerStackFactory::class); + $preparer = $this->container->get(PreparerStack::class); + + $this->assertInstanceOf(SerializationPreparer::class, $preparer[1]); + } +}