Skip to content

Commit dfaf088

Browse files
author
Hunter Skrasek
committed
Add unit test, to test for ObjectNotFoundExceptions.
1 parent 680e823 commit dfaf088

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/RackspaceTests.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ public function testHasFail()
4949
$this->assertFalse($adapter->has('filename.ext'));
5050
}
5151

52+
public function testHasNotFound()
53+
{
54+
$container = $this->getContainerMock();
55+
$container->shouldReceive('getObject')->andThrow('OpenCloud\ObjectStore\Exception\ObjectNotFoundException');
56+
$adapter = new Rackspace($container);
57+
$this->assertFalse($adapter->has('filename.ext'));
58+
}
59+
5260
public function testWrite()
5361
{
5462
$container = $this->getContainerMock();

0 commit comments

Comments
 (0)