public function testRead() { $mock = $this->getS3Client(); $mock->shouldReceive('getObject')->once()->andReturn(Mockery::self()); $mock->shouldReceive('getAll')->once()->andReturn(array('ContentLength' => 10, 'ContentType' => 'text/plain', 'Body' => '1234567890', 'Key' => 'file.ext')); $adapter = new Adapter($mock, 'bucketname'); $result = $adapter->read('file.ext'); $this->assertEquals('1234567890', $result['contents']); }