Scalr\Tests\Service\Azure\AzureTest::setUp PHP Метод

setUp() защищенный Метод

Set test names for objects
protected setUp ( )
    protected function setUp()
    {
        parent::setUp();
        if (static::isSkippedFunctionalTest()) {
            $this->markTestSkipped();
        }
        $testEnvId = \Scalr::config('scalr.phpunit.envid');
        try {
            $this->testEnv = \Scalr_Environment::init()->loadById($testEnvId);
        } catch (Exception $e) {
            $this->markTestSkipped('Test Environment does not exist.');
        }
        if (!$this->testEnv || !$this->testEnv->isPlatformEnabled(\SERVER_PLATFORMS::AZURE)) {
            $this->markTestSkipped('Azure platform is not enabled.');
        }
        $this->azure = $this->testEnv->azure();
        $this->subscriptionId = $this->azure->getEnvironment()->keychain(SERVER_PLATFORMS::AZURE)->properties[Entity\CloudCredentialsProperty::AZURE_SUBSCRIPTION_ID];
        $this->resourceGroupName = 'test3-resource-group-' . $this->getInstallationId();
        $this->availabilitySetName = 'test3-availability-set-' . $this->getInstallationId();
        $this->vmName = 'test3-virtual-machine-' . $this->getInstallationId();
        $this->vnName = 'test3-virtual-network-' . $this->getInstallationId();
        $this->nicName = 'test3-network-interface' . $this->getInstallationId();
        $this->publicIpName = 'myPublicIP3';
        $this->storageName = 'teststorage3' . $this->getInstallationId();
        $this->sgName = 'test3-security-group' . $this->getInstallationId();
    }