Example #1
0
 /**
  * @covers \Glue\Storage\Index::read
  */
 public function testRead()
 {
     $result = $this->index->read($this->testData['key']);
     $this->assertNotEquals(false, $result);
     $this->assertInternalType('array', $result);
     $this->assertFalse($this->index->read($this->faker->uuid));
 }
Example #2
0
 /**
  * Checks if item exists in storage
  *
  * @param  string  $name
  * @return boolean
  */
 public function exists($name)
 {
     $key = $this->getKey($name);
     $index = $this->index->read($key);
     return false !== $index;
 }