public function normalizeIgnoredAttributesDataProvider() { $stdClass = new \stdClass(); $stdClass->prop1 = 1; $stdClass->prop2 = 'string'; $stdClass->prop3 = null; $stdClass->ignore = 'ignore'; $stdClassNormalized = array('prop1' => 1, 'prop2' => 'string', 'prop3' => null, TypifiedNormalizer::META_CLASS => 'stdClass'); $flatClass = new FlatClass(); $flatClass->setProtectedValue(1)->publicValue = 2; $flatClassNormalized = array('protectedValue' => 1, TypifiedNormalizer::META_CLASS => 'tests\\evangelion1204\\Fixtures\\FlatClass'); $deepClass = new DeepClass(); $deepClass->setProtectedValue(1); $deepClassNormalized = array('parent' => null, TypifiedNormalizer::META_CLASS => 'tests\\evangelion1204\\Fixtures\\DeepClass'); return array(array($stdClass, $stdClassNormalized, 'ignore'), array($flatClass, $flatClassNormalized, 'publicValue'), array($deepClass, $deepClassNormalized, 'protectedValue')); }
public function defaultDataProvider() { $stdClass = new \stdClass(); $stdClass->prop1 = 1; $stdClass->prop2 = 'string'; $stdClass->prop3 = null; $stdClassNormalized = array('prop1' => 1, 'prop2' => 'string', 'prop3' => null, TypifiedNormalizer::META_CLASS => 'stdClass'); $flatClass = new FlatClass(); $flatClass->setProtectedValue(1)->publicValue = 2; $flatClassNormalized = array('protectedValue' => 1, 'publicValue' => 2, TypifiedNormalizer::META_CLASS => 'tests\\evangelion1204\\Fixtures\\FlatClass'); $parentClass = new \stdClass(); $parentClass->prop3 = true; $parentClass->child = $stdClass; $parentClassNormalized = array('prop3' => true, 'child' => $stdClassNormalized, TypifiedNormalizer::META_CLASS => 'stdClass'); $deepClass = new DeepClass(); $deepClass->setProtectedValue(1); $nestedDeepClass = new DeepClass(); $nestedDeepClass->setProtectedValue(2); $nestedDeepClass->setParent($deepClass); $deepClassNormalized = array('protectedValue' => 1, 'parent' => null, TypifiedNormalizer::META_CLASS => 'tests\\evangelion1204\\Fixtures\\DeepClass'); $nestedDeepClassNormalized = array('protectedValue' => 2, 'parent' => $deepClassNormalized, TypifiedNormalizer::META_CLASS => 'tests\\evangelion1204\\Fixtures\\DeepClass'); return array(array(array(), array()), array(array('key' => 'value'), array('key' => 'value')), array(array('key' => null), array('key' => null)), array(array(array('key' => null)), array(array('key' => null))), array(array(null), array(null)), array($stdClass, $stdClassNormalized), array($flatClass, $flatClassNormalized), array(array($stdClass), array($stdClassNormalized)), array($deepClass, $deepClassNormalized), array($nestedDeepClass, $nestedDeepClassNormalized)); }