public function testWriteInPlaceErased()
{
$metadatas = new Driver\Metadata\MetadataBag();
$metadatas->add(new Driver\Metadata\Metadata(new Driver\Tag\IPTC\ObjectName(), new Driver\Value\Mono('Beautiful Object')));
$metadatas->add(new Driver\Metadata\Metadata(new Driver\Tag\IPTC\ObjectName(), new Driver\Value\Mono('Beautiful Object')));
$metadatas->add(new Driver\Metadata\Metadata(new Driver\Tag\XMPIptcExt\PersonInImage(), new Driver\Value\Multi(array('Romain', 'Nicolas'))));
$this->object->erase(true);
$changedFiles = $this->object->write($this->inPlace, $metadatas);
$this->assertEquals(1, $changedFiles);
$reader = new Reader($this->getExiftool(), new RDFParser());
$metadatasRead = $reader->files($this->inPlace)->first()->getMetadatas();
$this->assertLessThanOrEqual(30, count($metadatasRead));
$this->assertEquals('Beautiful Object', $metadatasRead->get('IPTC:ObjectName')->getValue()->asString());
$this->assertEquals(array('Romain', 'Nicolas'), $metadatasRead->get('XMP-iptcExt:PersonInImage')->getValue()->asArray());
}