BaseWebTestCase.php 786 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use Silex\WebTestCase;
  3. //use Symfony\Bundle\FrameworkBundle\Test\WebTestCase
  4. /**
  5. * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-03-07 at 12:15:50.
  6. */
  7. class BaseWebTestCase extends WebTestCase
  8. {
  9. /**
  10. * @return \Symfony\Component\HttpKernel\HttpKernel
  11. */
  12. public function createApplication()
  13. {
  14. // do not use require_once
  15. $app = require '../../main/inc/global.inc.php';
  16. $app['debug'] = true;
  17. $app['session.test'] = true;
  18. $app['exception_handler']->disable();
  19. // Setting session obj for old libraries
  20. \ChamiloSession::setSession($app['session']);
  21. \UserManager::setEntityManager($app['orm.em']);
  22. //$app['monolog'] = $this->getMock('Monolog\Logger');
  23. return $app;
  24. }
  25. }