Example #1
0
 /**
  * Tests the scrollspy method.
  *
  * @return  void
  *
  * @since   3.6.0
  */
 public function testScrollspy()
 {
     // Initialise the scrollspy script
     JHtmlBootstrap::scrollspy();
     // 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($){ $("#navbar").scrollspy({"offset": 10}); });', 'Verify that the scrollspy script is initialised');
 }