setUp() protected method

See also: PHPUnit_Framework_TestCase::setUp()
protected setUp ( )
 /**
  * {@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.");
     }
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     if (!$this->getUser()->isScalrAdmin()) {
         $this->markTestSkipped();
     }
 }
Esempio n. 3
0
 /**
  * {@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.'));
     }
 }
Esempio n. 4
0
 /**
  * {@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.');
     }
 }
Esempio n. 5
0
 /**
  * {@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;
 }
Esempio n. 6
0
 /**
  * {@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;
 }
Esempio n. 7
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->skipIfPlatformDisabled(\SERVER_PLATFORMS::EC2);
 }
Esempio n. 8
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
 }
Esempio n. 9
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->testCategoryName = 'testrolecategory';
     $this->invalidCategoryName = 'Invalid-category!';
 }
Esempio n. 10
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->testMetricName = 'testmetric' . $this->getInstallationId();
 }
Esempio n. 11
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->testCertName = 'tescert' . $this->getInstallationId();
 }
Esempio n. 12
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests\WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->builder = $this->getMock('Scalr_UI_Controller_Farms_Builder', [], [], '', false);
 }
Esempio n. 13
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->skipIfPlatformDisabled(SERVER_PLATFORMS::EC2);
     $this->module = new Modules_Platforms_Ec2();
 }
Esempio n. 14
0
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->markTestSkippedIfPlatformDisabled(SERVER_PLATFORMS::EC2);
     $this->module = new Ec2PlatformModule();
 }