public function testRewriteObjectThrowsExceptionWithInvalidType() { $object = new StorageObject($this->connection->reveal(), 'object.txt.', 'bucket'); $copiedObject = $object->rewrite($object); }