setUp() protected method

See also: PHPUnit_Framework_TestCase::setUp()
protected setUp ( )
コード例 #1
0
 /**
  * {@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.");
     }
 }
コード例 #2
0
ファイル: AccountsTest.php プロジェクト: mheydt/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     if (!$this->getUser()->isScalrAdmin()) {
         $this->markTestSkipped();
     }
 }
コード例 #3
0
ファイル: TeamsTest.php プロジェクト: mheydt/scalr
 /**
  * {@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.'));
     }
 }
コード例 #4
0
ファイル: EnvironmentsTest.php プロジェクト: scalr/scalr
 /**
  * {@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.');
     }
 }
コード例 #5
0
ファイル: AuditLogTest.php プロジェクト: recipe/scalr
 /**
  * {@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;
 }
コード例 #6
0
ファイル: AuditLogTest.php プロジェクト: rickb838/scalr
 /**
  * {@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;
 }
コード例 #7
0
ファイル: RdsTest.php プロジェクト: recipe/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->skipIfPlatformDisabled(\SERVER_PLATFORMS::EC2);
 }
コード例 #8
0
ファイル: ApiTestCase.php プロジェクト: scalr/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
 }
コード例 #9
0
ファイル: CategoriesTest.php プロジェクト: scalr/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->testCategoryName = 'testrolecategory';
     $this->invalidCategoryName = 'Invalid-category!';
 }
コード例 #10
0
ファイル: MetricsTest.php プロジェクト: mheydt/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->testMetricName = 'testmetric' . $this->getInstallationId();
 }
コード例 #11
0
ファイル: CertificatesTest.php プロジェクト: mheydt/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->testCertName = 'tescert' . $this->getInstallationId();
 }
コード例 #12
0
ファイル: BuilderTest.php プロジェクト: scalr/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests\WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->builder = $this->getMock('Scalr_UI_Controller_Farms_Builder', [], [], '', false);
 }
コード例 #13
0
ファイル: Ec2Test.php プロジェクト: recipe/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->skipIfPlatformDisabled(SERVER_PLATFORMS::EC2);
     $this->module = new Modules_Platforms_Ec2();
 }
コード例 #14
0
ファイル: Ec2Test.php プロジェクト: mheydt/scalr
 /**
  * {@inheritdoc}
  * @see Scalr\Tests.WebTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->markTestSkippedIfPlatformDisabled(SERVER_PLATFORMS::EC2);
     $this->module = new Ec2PlatformModule();
 }