Skip to content

Commit

Permalink
JDocumentRenderer tests skipped
Browse files Browse the repository at this point in the history
The JDocumentRendererAtom and JDocumentRendererRSS classes are too tightly coupled
for good testing right now, so I marked the tests as skipped with a todo to come back after
breaking more dependencies in the code.
  • Loading branch information
Paladin committed Jun 3, 2011
1 parent 6b60f72 commit 7fbcf27
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
* @license GNU General Public License version 2 or later; see LICENSE
*/

require_once JPATH_PLATFORM.'/joomla/application/router.php';
require_once JPATH_PLATFORM.'/joomla/document/renderer.php';
require_once JPATH_PLATFORM.'/joomla/document/feed/feed.php';
require_once JPATH_PLATFORM.'/joomla/document/feed/renderer/atom.php';
require_once JPATH_PLATFORM.'/joomla/environment/request.php';
require_once JPATH_PLATFORM.'/joomla/environment/response.php';

/**
* Test class for JDocumentRendererAtom.
* Generated by PHPUnit on 2009-10-09 at 12:23:19.
Expand All @@ -30,10 +23,18 @@ class JDocumentRendererAtomTest extends JoomlaTestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @TODO Once the coupling has been loosed, revisit and build a test harness we can use
*
* @access protected
*/
protected function setUp()
{
$this->markTestSkipped("Too tightly coupled to internals to be testable now");

require_once JPATH_PLATFORM.'/joomla/application/router.php';
require_once JPATH_PLATFORM.'/joomla/environment/request.php';
require_once JPATH_PLATFORM.'/joomla/document/feed/feed.php';
require_once JPATH_PLATFORM.'/joomla/environment/response.php';
$this->saveFactoryState();

JFactory::$application = $this->getMock(
Expand Down Expand Up @@ -61,8 +62,9 @@ protected function setUp()
JRequest::setVar('type', 'atom');
$this->object = new JDocumentFeed;
$_SERVER['HTTP_HOST'] = 'localhost';
$_SERVER['SCRIPT_NAME'] = '';
}
// $_SERVER['SCRIPT_NAME'] = '/index.php';
$_SERVER['REQUEST_URI'] = '/index.php?format=feed&type=atom';
}

/**
* Tears down the fixture, for example, closes a network connection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
* @license GNU General Public License version 2 or later; see LICENSE
*/

require_once JPATH_PLATFORM.'/joomla/environment/request.php';
require_once JPATH_PLATFORM.'/joomla/document/renderer.php';
require_once JPATH_PLATFORM.'/joomla/document/feed/feed.php';
require_once JPATH_PLATFORM.'/joomla/document/feed/renderer/rss.php';

/**
* Test class for JDocumentRendererRSS.
* Generated by PHPUnit on 2009-10-09 at 13:47:52.
Expand All @@ -26,9 +21,20 @@ class JDocumentRendererRSSTest extends JoomlaTestCase
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @TODO Once the coupling has been loosed, revisit and build a test harness we can use
*
* @access protected
*/
protected function setUp()
{
$this->markTestSkipped("Too tightly coupled to internals to be testable now");

require_once JPATH_PLATFORM.'/joomla/application/router.php';
require_once JPATH_PLATFORM.'/joomla/environment/request.php';
require_once JPATH_PLATFORM.'/joomla/document/feed/feed.php';
require_once JPATH_PLATFORM.'/joomla/environment/response.php';

$this->saveFactoryState();

JFactory::$application = $this->getMock(
Expand Down

0 comments on commit 7fbcf27

Please sign in to comment.