Beispiel #1
0
 /**
  * @dataProvider  deleteProvider
  */
 public function testDelete($status, $expected)
 {
     $container = $this->getContainerMock();
     $dataObject = Mockery::mock('OpenCloud\\ObjectStore\\Resource\\DataObject');
     $dataObject->shouldReceive('delete')->andReturn(Mockery::self());
     $dataObject->shouldReceive('getStatusCode')->andReturn($status);
     $container->shouldReceive('getObject')->andReturn($dataObject);
     $adapter = new Rackspace($container);
     $this->assertEquals($expected, $adapter->delete('filename.ext'));
 }