From dfaf088832dd13f3a29b198444b0ca0f65030857 Mon Sep 17 00:00:00 2001 From: Hunter Skrasek Date: Tue, 4 Mar 2014 10:38:37 -0600 Subject: [PATCH] Add unit test, to test for ObjectNotFoundExceptions. --- tests/RackspaceTests.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/RackspaceTests.php b/tests/RackspaceTests.php index 9dfd7b5f5..c0db95f83 100644 --- a/tests/RackspaceTests.php +++ b/tests/RackspaceTests.php @@ -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();