42 lines
1.9 KiB
YAML
42 lines
1.9 KiB
YAML
name: CacheableObjectAttributesTestTrait
|
|
class_comment: null
|
|
dependencies:
|
|
- name: AbstractObjectNormalizer
|
|
type: class
|
|
source: Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer
|
|
properties: []
|
|
methods:
|
|
- name: testObjectCollectionNormalization
|
|
visibility: public
|
|
parameters: []
|
|
comment: "# * This test ensures that attributes caching implemented in AbstractObjectNormalizer\n\
|
|
# * does not break normalization of multiple objects having different set of initialized/unInitialized\
|
|
\ properties.\n# *\n# * The attributes cache MUST NOT depend on a specific object\
|
|
\ state, so that cached attributes could be reused\n# * while normalizing any\
|
|
\ number of instances of the same class in any order.\n# */\n# trait CacheableObjectAttributesTestTrait\n\
|
|
# {\n# /**\n# * Returns a collection of objects to be normalized and compared\
|
|
\ with the expected array.\n# * It is a specific object normalizer test class\
|
|
\ responsibility to prepare testing data.\n# */\n# abstract protected function\
|
|
\ getObjectCollectionWithExpectedArray(): array;\n# \n# abstract protected function\
|
|
\ getNormalizerForCacheableObjectAttributesTest(): AbstractObjectNormalizer;\n\
|
|
# \n# /**\n# * The same normalizer instance normalizes two objects of the same\
|
|
\ class in a row:\n# * 1. an object having some uninitialized properties\n# *\
|
|
\ 2. an object with all properties being initialized."
|
|
- name: testReversedObjectCollectionNormalization
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * The same normalizer instance normalizes two objects of the same class
|
|
in a row:
|
|
|
|
# * 1. an object with all properties being initialized
|
|
|
|
# * 2. an object having some uninitialized properties.'
|
|
- name: assertCollectionNormalizedProperly
|
|
visibility: private
|
|
parameters:
|
|
- name: collection
|
|
- name: expectedArray
|
|
comment: null
|
|
traits:
|
|
- Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer
|
|
interfaces: []
|