Exemplo n.º 1
0
 /**
  * @dataProvider  deleteDirProvider
  */
 public function testDeleteDir($status, $expected)
 {
     $container = $this->getContainerMock();
     $container->shouldReceive('getName')->andReturn('container_name');
     $dataObject = Mockery::mock('OpenCloud\\ObjectStore\\Resource\\DataObject');
     $dataObject->shouldReceive('getName')->andReturn('filename.ext');
     $container->shouldReceive('objectList')->andReturn(array($dataObject));
     $container->shouldReceive('getService')->andReturn($container);
     $container->shouldReceive('bulkDelete')->andReturn($container);
     $container->shouldReceive('getStatusCode')->andReturn($status);
     $adapter = new Rackspace($container);
     $this->assertEquals($expected, $adapter->deleteDir(''));
 }