This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 22nd, 2010  |  syntax: PHP  |  size: 1.20 KB  |  views: 98  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. use Doctrine\ORM\Tools\SchemaTool;
  4. use Doctrine\Common\ClassLoader;
  5.  
  6. // Define path to application directory
  7. defined('APPLICATION_PATH')
  8.     || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
  9.  
  10. // Define application environment
  11. define('APPLICATION_ENV', 'testing');
  12.  
  13. // Ensure library/ is on include_path
  14. set_include_path(implode(PATH_SEPARATOR, array(
  15.   realpath(APPLICATION_PATH),
  16.   realpath(APPLICATION_PATH . '/../library'),
  17.   get_include_path(),
  18. )));
  19.  
  20. /** Zend_Application */
  21. require_once 'Zend/Application.php';
  22.  
  23. // Create application, bootstrap, and run
  24. $application = new Zend_Application(
  25.     APPLICATION_ENV,
  26.     APPLICATION_PATH . '/configs/application.ini'
  27. );
  28. $application->bootstrap();
  29.  
  30. $zendAutoloader = Zend_Loader_Autoloader::getInstance();
  31.  
  32. // DoctrineExtensions
  33. /*$autoloader = array(new ClassLoader('DoctrineExtensions'), 'loadClass');
  34. $zendAutoloader->pushAutoloader($autoloader, 'DoctrineExtensions');*/
  35. $autoloader = new ClassLoader('DoctrineExtensions');
  36. $autoloader->register();
  37.  
  38. // PHPUnit
  39. $zendAutoloader->registerNamespace('PHPUnit_');
  40.  
  41. $front = Zend_Controller_Front::getInstance();
  42. $front->setDefaultModule('default');
clone this paste RAW Paste Data