/** * {@inheritdoc} * @see \Scalr\Tests\TestCase::setUp() */ protected function setUp() { parent::setUp(); if (!\Scalr::getContainer()->analytics->enabled) { $this->markTestSkipped("Cost analytics has not been enabled in the configuration."); } }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); if (!$this->getUser()->isScalrAdmin()) { $this->markTestSkipped(); } }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); if (!$this->getUser()->canManageAcl()) { $this->markTestSkipped(sprintf('Specified test user is not allowed to manage Teams. ' . 'Please provide account owner or account admin user for the scalr.phpunit.userid parameter.')); } }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); if (!$this->getUser()->canManageAcl() && !$this->getUser()->isTeamOwner()) { $this->markTestSkipped('Specified test user is not allowed to manage environments.'); } }
/** * {@inheritdoc} * @see PHPUnit_Framework_TestCase::setUp() */ protected function setUp() { parent::setUp(); $container = \Scalr::getContainer(); if ($container->user === null) { $this->setTestUserToContainer(); } else { try { $container->user->getId(); } catch (\Exception $e) { $this->setTestUserToContainer(); } } $this->logger = $container->auditLog; }
/** * {@inheritdoc} * @see PHPUnit_Framework_TestCase::setUp() */ protected function setUp() { parent::setUp(); $container = \Scalr::getContainer(); if (!$container->initialized('user') || !$container->user instanceof \Scalr_Account_User) { $this->setTestUserToContainer(); } else { try { $container->user->getId(); } catch (\Exception $e) { $this->setTestUserToContainer(); } } $this->logger = $container->auditLog; }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); $this->skipIfPlatformDisabled(\SERVER_PLATFORMS::EC2); }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); $this->testCategoryName = 'testrolecategory'; $this->invalidCategoryName = 'Invalid-category!'; }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); $this->testMetricName = 'testmetric' . $this->getInstallationId(); }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); $this->testCertName = 'tescert' . $this->getInstallationId(); }
/** * {@inheritdoc} * @see Scalr\Tests\WebTestCase::setUp() */ protected function setUp() { parent::setUp(); $this->builder = $this->getMock('Scalr_UI_Controller_Farms_Builder', [], [], '', false); }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); $this->skipIfPlatformDisabled(SERVER_PLATFORMS::EC2); $this->module = new Modules_Platforms_Ec2(); }
/** * {@inheritdoc} * @see Scalr\Tests.WebTestCase::setUp() */ protected function setUp() { parent::setUp(); $this->markTestSkippedIfPlatformDisabled(SERVER_PLATFORMS::EC2); $this->module = new Ec2PlatformModule(); }