I suggest taking a look at how JHtmlJquery tests are set up and copying
that effort should fix your issues

On Friday, November 15, 2013, George Wilson wrote:

> In tests/unit/suites/libraries/cms/html/JHtmlBehaviorTest.php:
>
> > @@ -233,6 +233,12 @@ public function testSwitcher()
> >
> >  		JFactory::$application = $mock;
> >
> > +		$this->assertArrayHasKey(
> > +			'/media/jui/js/jquery.min.js',
> > +			$document->_scripts,
>
> Both jQuery tests still failing which is odd - beginning to wonder if we'd
> need to mock it in some way as something very odd is going on there.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/joomla/joomla-cms/pull/2494/files#r7705190>
> .
>