setMetadata() public méthode

public setMetadata ( $key, $value )
Exemple #1
0
 public function testGetSetMetadata()
 {
     $document = new Document();
     $this->assertSame(null, $document->getMetadata('foo'));
     $this->assertSame('default', $document->getMetadata('foo', 'default'));
     $document->setMetadata('foo', 'bar');
     $this->assertSame('bar', $document->getMetadata('foo'));
     $this->assertSame('bar', $document->getMetadata('foo', 'default'));
 }