$this->propertyAccessor->
setValue($author, 'magicCallProperty', 'Updated'
);
} public function testSetValueUpdatesMagicCallIfEnabled() { $this->propertyAccessor =
new PropertyAccessor(PropertyAccessor::MAGIC_CALL
);
$author =
new TestClassMagicCall('Bernhard'
);
$this->propertyAccessor->
setValue($author, 'magicCallProperty', 'Updated'
);
$this->
assertEquals('Updated',
$author->
__call('getMagicCallProperty',
[]));
} public function testGetValueWhenArrayValueIsNull() { $this->propertyAccessor =
new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH
);
$this->
assertNull($this->propertyAccessor->
getValue(['index' =>
['nullable' => null
]], '[index][nullable]'
));
} /**
* @dataProvider getValidReadPropertyPaths
*/