/** * Creates an abstract item instance. * * @return PHP_Depend_Code_AbstractItem */ protected function createItem() { $class = new PHP_Depend_Code_Class(__CLASS__); $class->setContext($this->getMock('PHP_Depend_Builder_Context')); return $class; }
/** * Creates an abstract item instance. * * @return PHP_Depend_Code_AbstractItem */ protected function createItem() { $class = new PHP_Depend_Code_Class(__CLASS__); $class->setSourceFile(new PHP_Depend_Code_File(__FILE__)); $class->setCache(new PHP_Depend_Util_Cache_Driver_Memory()); $class->setContext($this->getMock('PHP_Depend_Builder_Context')); return $class; }
/** * Creates a ready to use class fixture. * * @param string $name Optional class name. * * @return PHP_Depend_Code_Class * @since 1.0.2 */ protected function createClassFixture($name = null) { $name = $name ? $name : get_class($this); $class = new PHP_Depend_Code_Class($name); $class->setSourceFile(new PHP_Depend_Code_File($GLOBALS['argv'][0])); $class->setCache(new PHP_Depend_Util_Cache_Driver_Memory()); $class->setContext($this->getMock('PHP_Depend_Builder_Context')); return $class; }