• File: RackspaceFilesystemSpec.php
  • Full Path: /var/www/crm_set/modules/backup/vendor/backup-manager/backup-manager/spec/Filesystems/RackspaceFilesystemSpec.php
  • Date Modified: 09/21/2026 4:20 AM
  • File size: 1.01 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace spec\BackupManager\Filesystems;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

/**
 * Class RackspaceFilesystemSpec
 *
 * This driver can't be tested because the library is poorly written
 * and the constructor immediately tries to connect.
 *
 * @package spec\BackupManager\Filesystems
 */
class RackspaceFilesystemSpec extends ObjectBehavior {

    function it_is_initializable() {
        $this->shouldHaveType('BackupManager\Filesystems\RackspaceFilesystem');
    }

    function it_should_recognize_its_type_with_case_insensitivity() {
        foreach (['rackspace', 'RackSpace', 'RACKSPACE'] as $type) {
            $this->handles($type)->shouldBe(true);
        }

        foreach ([null, 'foo'] as $type) {
            $this->handles($type)->shouldBe(false);
        }
    }

    function getConfig() {
        return [
            'username' => 'username',
            'key'      => 'key',
            'root'     => 'root',
            'zone'     => 'zone',
            'endpoint' => 0
        ];
    }
}