/** * Tests the carousel method. * * @return void * * @since 3.6.0 */ public function testCarousel() { // Initialise the carousel script JHtmlBootstrap::carousel(); // Get the document instance $document = JFactory::getDocument(); $this->assertArrayHasKey('/media/jui/js/bootstrap.min.js', $document->_scripts, 'Verify that the alert method initialises Bootstrap as well'); $this->assertEquals($document->_script['text/javascript'], 'jQuery(function($){ $(".carousel").carousel({"interval": 5000,"pause": "hover"}); });', 'Verify that the carousel script is initialised'); }