/**
  * @dataProvider getPathsWithUnexpectedType
  * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException
  * @expectedExceptionMessage PropertyAccessor requires a graph of objects or arrays to operate on
  */
 public function testRemoveThrowsExceptionIfNotObjectOrArray($objectOrArray, $path)
 {
     $this->propertyAccessor->remove($objectOrArray, $path);
 }
 /**
  * @dataProvider getPathsWithMissingIndex
  */
 public function testRemoveThrowsNoExceptionIfIndexNotFound($collection, $path)
 {
     $clone = unserialize(serialize($collection));
     $this->propertyAccessor->remove($collection, $path);
     $this->assertEquals($clone, $collection);
 }
 /**
  * {@inheritdoc}
  */
 public function removeOption($id, $optionName)
 {
     $options = $this->rawLayout->getProperty($id, RawLayout::OPTIONS);
     $this->propertyAccessor->remove($options, $this->getPropertyPath($optionName));
     $this->rawLayout->setProperty($id, RawLayout::OPTIONS, $options);
 }
 public function testRemoveNestedExceptionMessage()
 {
     $value = (object) array('foobar' => null);
     $this->propertyAccessor->remove($value, 'foobar.baz');
 }