Ejemplo n.º 1
0
 /**
  * @param OpenCloud\ObjectStore\Service             $objectStore
  * @param OpenCloud\ObjectStore\Resource\Container  $container
  * @param OpenCloud\ObjectStore\Resource\DataObject $object
  */
 function it_reads_file($objectStore, $container, $object)
 {
     $object->saveToString()->willReturn("Hello World");
     $container->dataObject("test")->willReturn($object);
     $objectStore->container("test")->willReturn($container);
     $this->read('test')->shouldReturn('Hello World');
 }
 /**
  * @param Gaufrette\Adapter\OpenStackCloudFiles\ConnectionFactoryInterface $connectionFactory
  * @param OpenCloud\OpenStack                                              $connection
  * @param OpenCloud\ObjectStore\Service                                    $objectStore
  * @param OpenCloud\ObjectStore\Resource\Container                         $container
  * @param OpenCloud\ObjectStore\Resource\DataObject                        $object
  */
 function it_reads_file($connectionFactory, $connection, $objectStore, $container, $object)
 {
     $object->saveToString()->willReturn("Hello World");
     $container->dataObject("test")->willReturn($object);
     $objectStore->container("test")->willReturn($container);
     $connection->objectStore()->willReturn($objectStore)->shouldBeCalledTimes(1);
     $connectionFactory->create()->willReturn($connection)->shouldBeCalledTimes(1);
     $this->read('test')->shouldReturn('Hello World');
 }