Inheritance: extends PHPUnit_Framework_TestCase
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     /** @var Connection|\PHPUnit_Framework_MockObject_MockObject $connection */
     $connection = $this->getMock('Doctrine\\DBAL\\Connection', [], [], '', false);
     $this->warmer = new ContaoCacheWarmer(new Filesystem(), new ResourceFinder($this->getRootDir() . '/vendor/contao/test-bundle/Resources/contao'), new FileLocator($this->getRootDir() . '/vendor/contao/test-bundle/Resources/contao'), $this->getRootDir() . '/vendor/contao/test-bundle/Resources/contao', $connection, $this->mockContaoFramework());
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->framework = $this->getMockBuilder('Contao\\CoreBundle\\Framework\\ContaoFramework')->disableOriginalConstructor()->getMock();
     $frontendAdapter = $this->getMockBuilder('Contao\\CoreBundle\\Framework\\Adapter')->setMethods(['getResponseFromCache'])->disableOriginalConstructor()->getMock();
     $frontendAdapter->expects($this->any())->method('getResponseFromCache')->willReturn(new Response());
     $this->framework->expects($this->any())->method('getAdapter')->willReturn($frontendAdapter);
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     /** @var \Twig_Environment $twig */
     $twig = $this->getMockBuilder('Twig_Environment')->setConstructorArgs([$this->getMock('Twig_LoaderInterface')])->getMock();
     /** @var LoggerInterface $logger */
     $logger = $this->getMock('Psr\\Log\\LoggerInterface');
     $this->listener = new PrettyErrorScreenListener(true, $twig, $this->mockContaoFramework(), $this->mockTokenStorage(), $logger);
 }
Beispiel #4
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     copy(__DIR__ . '/../Fixtures/images/dummy.jpg', self::$rootDir . '/dummy.jpg');
     $GLOBALS['TL_CONFIG']['debugMode'] = false;
     $GLOBALS['TL_CONFIG']['gdMaxImgWidth'] = 3000;
     $GLOBALS['TL_CONFIG']['gdMaxImgHeight'] = 3000;
     $GLOBALS['TL_CONFIG']['validImageTypes'] = 'jpeg,jpg,svg,svgz';
     define('TL_ERROR', 'ERROR');
     define('TL_ROOT', self::$rootDir);
 }
Beispiel #5
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     copy(__DIR__ . '/../Fixtures/images/dummy.jpg', self::$rootDir . '/dummy.jpg');
     $GLOBALS['TL_CONFIG']['debugMode'] = false;
     $GLOBALS['TL_CONFIG']['gdMaxImgWidth'] = 3000;
     $GLOBALS['TL_CONFIG']['gdMaxImgHeight'] = 3000;
     $GLOBALS['TL_CONFIG']['validImageTypes'] = 'jpeg,jpg,svg,svgz';
     define('TL_ERROR', 'ERROR');
     define('TL_FILES_URL', '');
     define('TL_ROOT', self::$rootDir);
     System::setContainer($this->mockContainerWithContaoScopes());
 }
 /**
  * Creates a new Contao module bundle.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->bundle = new ContaoModuleBundle('foobar', $this->getRootDir() . '/app');
 }
 /**
  * Creates the core extension object.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->extension = new ContaoCoreExtension();
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->framework = $this->getMockBuilder('Contao\\CoreBundle\\ContaoFramework')->disableOriginalConstructor()->getMock();
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->listener = new LocaleListener(['en']);
 }
Beispiel #10
0
 /**
  * Creates the PhpFileLoader object.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->loader = new PhpFileLoader();
 }
 /**
  * Returns the normalized root directory.
  *
  * @return string
  */
 public function getRootDir()
 {
     return strtr(parent::getRootDir(), '\\', '/');
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->framework = $this->getMockBuilder('Contao\\CoreBundle\\Framework\\ContaoFramework')->disableOriginalConstructor()->getMock();
     $this->framework->expects($this->any())->method('getAdapter')->willReturn($this->mockConfigAdapter());
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->listener = new PrettyErrorScreenListener(true, $this->getMock('Twig_Environment'), $this->mockConfig());
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->random = $this->getMock('Symfony\\Component\\Security\\Core\\Util\\SecureRandomInterface');
     $this->generator = new TokenGenerator($this->random, self::ENTROPY);
 }
Beispiel #15
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     define('TL_ROOT', self::$rootDir);
     System::setContainer($this->mockContainerWithContaoScopes());
 }
Beispiel #16
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     define('TL_ROOT', self::$rootDir);
 }