You are here

protected function CoderSniffUnitTest::setUp in Coder 8.2

Same name and namespace in other branches
  1. 8.3 tests/Drupal/CoderSniffUnitTest.php \Drupal\Test\CoderSniffUnitTest::setUp()

Sets up this unit test.

Return value

void

File

coder_sniffer/Drupal/Test/CoderSniffUnitTest.php, line 56

Class

CoderSniffUnitTest

Namespace

Drupal\Test

Code

protected function setUp() {
  $class = get_class($this);
  $this->rootDir = __DIR__ . '/../../';
  $this->testsDir = __DIR__ . '/';
  $this->standardsDir = __DIR__ . '/../';

  // Required to pull in all the defines from the tokens file.
  $tokens = new Tokens();
  if (!defined('PHP_CODESNIFFER_VERBOSITY')) {
    define('PHP_CODESNIFFER_VERBOSITY', 0);
  }
  if (!defined('PHP_CODESNIFFER_CBF')) {
    define('PHP_CODESNIFFER_CBF', 0);
  }
}