Example #1
0
 public function testUpdateDeleteAndGetMetadata()
 {
     $publicKey = 'publickey';
     $imageIdentifier = 'id';
     $this->assertTrue($this->adapter->insertImage($publicKey, $imageIdentifier, $this->getImage()));
     $this->assertTrue($this->adapter->updateMetadata($publicKey, $imageIdentifier, array('foo' => 'bar')));
     $this->assertSame(array('foo' => 'bar'), $this->adapter->getMetadata($publicKey, $imageIdentifier));
     $this->assertTrue($this->adapter->deleteMetadata($publicKey, $imageIdentifier));
     $this->assertSame(array(), $this->adapter->getMetadata($publicKey, $imageIdentifier));
 }
Example #2
0
 public function testUpdateDeleteAndGetMetadata()
 {
     $user = '******';
     $imageIdentifier = 'id';
     $this->assertTrue($this->adapter->insertImage($user, $imageIdentifier, $this->getImage()));
     $this->assertTrue($this->adapter->updateMetadata($user, $imageIdentifier, ['foo' => 'bar']));
     $this->assertSame(['foo' => 'bar'], $this->adapter->getMetadata($user, $imageIdentifier));
     $this->assertTrue($this->adapter->deleteMetadata($user, $imageIdentifier));
     $this->assertSame([], $this->adapter->getMetadata($user, $imageIdentifier));
 }