Example #1
0
 /**
  * Initializes a in memory cache.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_cache = new PHP_Depend_Util_Cache_Driver_Memory();
 }
Example #2
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()]);
         }
     }
 }