Skip to content

Commit

Permalink
Add unit test, to test for ObjectNotFoundExceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter Skrasek committed Mar 4, 2014
1 parent 680e823 commit dfaf088
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/RackspaceTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ public function testHasFail()
$this->assertFalse($adapter->has('filename.ext'));
}

public function testHasNotFound()
{
$container = $this->getContainerMock();
$container->shouldReceive('getObject')->andThrow('OpenCloud\ObjectStore\Exception\ObjectNotFoundException');
$adapter = new Rackspace($container);
$this->assertFalse($adapter->has('filename.ext'));
}

public function testWrite()
{
$container = $this->getContainerMock();
Expand Down

0 comments on commit dfaf088

Please sign in to comment.