/** * Adds (defines) a specific property and its type. * * @param string $name Name of the property * @param string $type Type of the property * @param boolean $lazy Whether the property should be lazy-loaded when reconstituting * @param string $cascade Strategy to cascade the object graph. * @return void */ public function addProperty($name, $type, $lazy = FALSE, $cascade = '') { $type = $this->typeHandlingService->parseType($type); $this->properties[$name] = array('type' => $type['type'], 'elementType' => $type['elementType'], 'lazy' => $lazy, 'cascade' => $cascade); }
/** * @test * @dataProvider types * @author Karsten Dambekalns <*****@*****.**> * @param mixed $type * @param mixed $expectedResult */ public function parseTypeReturnsArrayWithInformation($type, $expectedResult) { $this->assertEquals($expectedResult, $this->typeHandlingService->parseType($type)); }