public function setUp() { parent::setup(); $this->serviceManager = Bootstrap::getServiceManager(); $this->em = $this->serviceManager->get('Doctrine\\ORM\\EntityManager'); $this->negocio = new AnexoNegocio($this->em); }
$zf2Path = $vendorPath . '/zendframework/zendframework/library'; } } if (!$zf2Path) { throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.'); } include $zf2Path . '/Zend/Loader/AutoloaderFactory.php'; AutoloaderFactory::factory(array('Zend\\Loader\\StandardAutoloader' => array('autoregister_zf' => true, 'namespaces' => array(__NAMESPACE__ => __DIR__ . '/' . __NAMESPACE__)))); } protected static function findParentPath($path) { include __DIR__ . '/../../../init_autoloader.php'; include __DIR__ . '/../../../vendor/autoload.php'; $dir = __DIR__; $previousDir = '.'; while (!is_dir($dir . '/' . $path)) { $dir = dirname($dir); if ($previousDir === $dir) { return false; } $previousDir = $dir; } return $dir . '/' . $path; } public static function getServiceManager() { return static::$serviceManager; } } Bootstrap::init();