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