setUp() protected méthode

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