Skip to content

Commit

Permalink
Merge pull request joomla#469 from robschley/master
Browse files Browse the repository at this point in the history
Minor Cleanup and Fixes
  • Loading branch information
LouisLandry committed Oct 29, 2011
2 parents dc117e5 + b7a0699 commit fb9af6d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
36 changes: 36 additions & 0 deletions libraries/joomla/application/web.php
Expand Up @@ -890,6 +890,42 @@ public function getBody($asArray = false)
return $asArray ? $this->response->body : implode((array) $this->response->body);
}

/**
* Method to get the application document object.
*
* @return JDocument The document object
*
* @since 11.3
*/
public function getDocument()
{
return $this->document;
}

/**
* Method to get the application language object.
*
* @return JLanguage The language object
*
* @since 11.3
*/
public function getLanguage()
{
return $this->language;
}

/**
* Method to get the application session object.
*
* @return JSession The session object
*
* @since 11.3
*/
public function getSession()
{
return $this->session;
}

/**
* Method to check the current client connnection status to ensure that it is alive. We are
* wrapping this to isolate the connection_status() function from our code base for testing reasons.
Expand Down
1 change: 1 addition & 0 deletions libraries/joomla/session/session.php
Expand Up @@ -12,6 +12,7 @@
// Register the session storage class with the loader
JLoader::register('JSessionStorage', dirname(__FILE__) . '/storage.php');

jimport('joomla.application.application');
jimport('joomla.environment.request');

/**
Expand Down
11 changes: 8 additions & 3 deletions tests/suite/joomla/application/cli/JDaemonTest.php
Expand Up @@ -39,8 +39,8 @@ 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.');
if (!extension_loaded("PCNTL")){
$this->markTestSkipped('The PCNTL extension is not available.');
}

// Get a new JDaemonInspector instance.
Expand Down Expand Up @@ -68,7 +68,12 @@ protected function tearDown()
JDaemonInspector::$pcntlFork = 0;
JDaemonInspector::$pcntlSignal = true;
JDaemonInspector::$pcntlWait = 0;
$this->inspector->setClassInstance(null);

// Check if the inspector was instantiated.
if (isset($this->inspector))
{
$this->inspector->setClassInstance(null);
}

$this->restoreFactoryState();

Expand Down

0 comments on commit fb9af6d

Please sign in to comment.