Scalr\Tests\WebTestCase::setUp PHP Method

setUp() protected method

See also: PHPUnit_Framework_TestCase::setUp()
protected setUp ( )
    protected function setUp()
    {
        parent::setUp();
        //TODO It should be removed when we clean up NOTICES
        $this->errorLevel = error_reporting();
        $this->markTestSkippedIfFunctionalTestsDisabled();
        if (\Scalr::config('scalr.phpunit.userid')) {
            $this->_testUserId = \Scalr::config('scalr.phpunit.userid');
        }
        if (\Scalr::config('scalr.phpunit.envid')) {
            $this->_testEnvId = \Scalr::config('scalr.phpunit.envid');
        }
        if (!$this->isAdminUserTestClass() && (!empty($this->_testUserId) && $this->getUser()->isScalrAdmin())) {
            $this->markTestSkipped('Current test class cannot be passed with scalr admin session.');
        }
    }

Usage Example

 /**
  * {@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.");
     }
 }
All Usage Examples Of Scalr\Tests\WebTestCase::setUp