PHPExiftool\Test\AbstractWriterTest::testWrite PHP Метод

testWrite() публичный Метод

public testWrite ( )
    public function testWrite()
    {
        $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'))));
        $changedFiles = $this->object->write($this->in, $metadatas, $this->out);
        $this->assertEquals(1, $changedFiles);
        $reader = new Reader($this->getExiftool(), new RDFParser());
        $metadatasRead = $reader->files($this->out)->first()->getMetadatas();
        $this->assertGreaterThan(200, count($metadatasRead));
        $this->assertEquals('Beautiful Object', $metadatasRead->get('IPTC:ObjectName')->getValue()->asString());
        $this->assertEquals(array('Romain', 'Nicolas'), $metadatasRead->get('XMP-iptcExt:PersonInImage')->getValue()->asArray());
    }