Exemplo n.º 1
0
 /**
  * Creates the temp log file name.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_tempFile = self::createRunResourceURI('pdepend.phpunit-log.xml');
     if (file_exists($this->_tempFile)) {
         unlink($this->_tempFile);
     }
 }
Exemplo n.º 2
0
 /**
  * setUp()
  * 
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_outputFile = self::createRunResourceURI('jdepend-test-out.svg');
     if (file_exists($this->_outputFile)) {
         unlink($this->_outputFile);
     }
 }
Exemplo n.º 3
0
 /**
  * Creates temporary test resources.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->cacheDir = self::createRunResourceURI('cacheDir');
     $this->testFile = self::createRunResourceURI('testFile');
 }
Exemplo n.º 4
0
 /**
  * Creates the expected metrics array.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $packages = self::parseSource(dirname(__FILE__) . '/../../_code/code-5.2.x');
     $this->_analyzer = new PHP_Depend_Metrics_CodeRank_Analyzer();
     $this->_analyzer->analyze($packages);
     $this->_expected = array();
     foreach ($packages as $package) {
         if ($package->getTypes()->count() === 0) {
             continue;
         }
         $this->_expected[] = array($package, $this->_input[$package->getName()]);
         foreach ($package->getTypes() as $type) {
             $this->_expected[] = array($type, $this->_input[$type->getName()]);
         }
     }
 }
Exemplo n.º 5
0
 /**
  * Creates the package structure from a test source file.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->resultFile = self::createRunResourceURI('log-summary.xml');
 }
Exemplo n.º 6
0
 /**
  * Initializes a temporary workling directory.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->cacheDir = self::createRunResourceURI('cache');
     $this->versionFile = "{$this->cacheDir}/_version";
 }
Exemplo n.º 7
0
 /**
  * Changes the current working directory.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->workingDir = getcwd();
     chdir(dirname(__FILE__));
 }
Exemplo n.º 8
0
 /**
  * Sets up the code builder.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $packages = self::parseSource(dirname(__FILE__) . '/../../_code/mixed_code.php');
     foreach ($packages as $pkg) {
         if (isset($this->_input[$pkg->getUUID()])) {
             $this->_expected[$pkg->getUUID()] = $this->_input[$pkg->getName()];
         }
     }
 }
Exemplo n.º 9
0
 /**
  * Creates the package structure from a test source file.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->resultFile = self::createRunResourceURI('pdepend-log.xml');
 }
Exemplo n.º 10
0
 /**
  * Stores the original include path.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->includePath = get_include_path();
 }
Exemplo n.º 11
0
 /**
  * Creates the package structure from a test source file.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->packages = self::parseSource(dirname(__FILE__) . '/../../_code/code-5.2.x');
     $this->analyzer = new PHP_Depend_Metrics_Dependency_Analyzer();
     $this->analyzer->analyze($this->packages);
     $this->resultFile = self::createRunResourceURI('pdepend-log.xml');
 }
Exemplo n.º 12
0
 /**
  * Creates the package structure from a test source file.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->testFileName = dirname(__FILE__) . '/../../_code/mixed_code.php';
     $this->testFileName = realpath($this->testFileName);
     $this->packages = self::parseSource($this->testFileName);
     $this->resultFile = self::createRunResourceURI('log-summary.xml');
 }
 /**
  * Initializes a list of expected exception messages.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->expectedExceptions = array(sprintf('Unexpected token: function, line: 7, col: 41, file: %s.', self::createCodeResourceURI('issues/061/UnexpectedTokenInParameterDefaultValue.php')));
 }