/** * Setup for testing. * * @return void * * @since 11.3 */ public function setUp() { parent::setUp(); // We are only coupled to Document and Language in JFactory. $this->saveFactoryState(); JFactory::$language = $this->getMockLanguage(); }
/** * Setup for testing. * * @return void * * @since 11.4 */ protected function setUp() { parent::setUp(); // Verify that GD support for PHP is available. if (!extension_loaded('gd')) { $this->markTestSkipped('No GD support so skipping JImage tests.'); } }
/** * Setup for testing. * * @return void * * @since 11.3 */ protected function setUp() { parent::setUp(); // Verify that GD support for PHP is available. if (!extension_loaded('gd')) { $this->markTestSkipped('No GD support so skipping JImage tests.'); } $this->testFile = JPATH_TESTS . '/suite/joomla/image/stubs/koala.jpg'; $this->testFileGif = JPATH_TESTS . '/suite/joomla/image/stubs/koala.gif'; $this->testFilePng = JPATH_TESTS . '/suite/joomla/image/stubs/koala.png'; $this->testFileBmp = JPATH_TESTS . '/suite/joomla/image/stubs/koala.bmp'; }
/** * Setup for testing. * * @return void * * @since 11.3 */ public function setUp() { parent::setUp(); $_SERVER['HTTP_HOST'] = self::TEST_HTTP_HOST; $_SERVER['HTTP_USER_AGENT'] = self::TEST_USER_AGENT; // Get a new JApplicationWebInspector instance. $this->inspector = new JApplicationWebInspector(); // We are only coupled to Document and Language in JFactory. $this->saveFactoryState(); JFactory::$document = $this->getMockDocument(); JFactory::$language = $this->getMockLanguage(); }
/** * Sets up the fixture. * * This method is called before a test is executed. * * @return void * * @since 11.1 */ protected function setUp() { parent::setUp(); // Mock the event dispatcher. $dispatcher = $this->getMockDispatcher(false); $this->assignMockCallbacks($dispatcher, array('trigger' => array(get_called_class(), 'mockTrigger'))); // Inject the mock dispatcher into the JDispatcher singleton. JDispatcherInspector::setInstance($dispatcher); // Mock the authentication plugin require_once __DIR__ . '/stubs/FakeAuthenticationPlugin.php'; // Inject the mocked plugin list. JPluginHelperInspector::setPlugins(array((object) array('type' => 'authentication', 'name' => 'fake'))); }
/** * Setup for testing. * * @return void * * @since 11.3 */ public function setUp() { parent::setUp(); // Setup the system logger to echo all. //JLog::addLogger(array('logger' => 'echo'), JLog::ALL); $_SERVER['HTTP_HOST'] = self::TEST_HTTP_HOST; $_SERVER['HTTP_USER_AGENT'] = self::TEST_USER_AGENT; // Get a new JWebInspector instance. $this->inspector = new JWebInspector(); // We are only coupled to Document and Language in JFactory. $this->saveFactoryState(); JFactory::$document = $this->getMockDocument(); JFactory::$language = $this->getMockLanguage(); }
/** * Setup for testing. * * @return void * * @since 11.3 */ public function setUp() { parent::setUp(); // Skip this test suite if PCNTL extension is not available if (!extension_loaded("PCNTL")) { $this->markTestSkipped('The PCNTL extension is not available.'); } // Get a new JDaemonInspector instance. $this->inspector = new JDaemonInspector(); $this->inspector->setClassInstance($this->inspector); //$this->config->set('max_memory_limit', '2048M'); // We are only coupled to Document and Language in JFactory. $this->saveFactoryState(); // Setup the system logger to echo all. //JLog::addLogger(array('logger' => 'echo'), JLog::ALL); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); }
/** * Sets up the fixture. * * This method is called before a test is executed. * * @return void * * @since 11.1 */ protected function setUp() { parent::setUp(); $this->saveFactoryState(); JFactory::$database = $this->getMockDatabase(); }
/** * Sets up the fixture. * * This method is called before a test is executed. * * @return void * * @since 11.3 */ public function setUp() { parent::setUp(); $this->saveFactoryState(); }
/** * Setup for testing. * * @return void * * @since 11.3 */ public function setUp() { parent::setUp(); // Get a new JApplicationCliInspector instance. $this->inspector = new JApplicationCliInspector(); }