Skip to content

Commit

Permalink
Add test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Dec 24, 2014
1 parent a3fcd40 commit 352ca75
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions tests/unit/suites/libraries/legacy/categories/JCategoriesTest.php
Expand Up @@ -32,16 +32,29 @@ class JCategoriesTest extends TestCaseDatabase
*
* @since 3.2
*/
protected function setUp()
public function setUp()
{
parent::setUp();

// Add JApplication and JLanguage dependencies
$this->saveFactoryState();
JFactory::$language = $this->getMockLanguage();
JFactory::$application = $this->getMockCmsApp();;
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
* Overrides the parent tearDown method.
*
* @return void
*
* @see PHPUnit_Framework_TestCase::tearDown()
* @since 3.2
*/
protected function tearDown()
{
$this->restoreFactoryState();

parent::tearDown();
}

/**
Expand Down

0 comments on commit 352ca75

Please sign in to comment.