Ejemplo n.º 1
0
 /**
  * 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();
 }
Ejemplo n.º 2
0
 /**
  * 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.');
     }
 }
Ejemplo n.º 3
0
 /**
  * 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';
 }
Ejemplo n.º 4
0
 /**
  * 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();
 }
Ejemplo n.º 5
0
 /**
  * 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')));
 }
Ejemplo n.º 6
0
 /**
  * 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();
 }
Ejemplo n.º 7
0
 /**
  * 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);
 }
Ejemplo n.º 8
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     parent::setUp();
 }
Ejemplo n.º 9
0
 /**
  * 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();
 }
Ejemplo n.º 10
0
 /**
  * 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();
 }
Ejemplo n.º 11
0
 /**
  * Setup for testing.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function setUp()
 {
     parent::setUp();
     // Get a new JApplicationCliInspector instance.
     $this->inspector = new JApplicationCliInspector();
 }