Example #1
0
 /**
  * Tests the button method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testButton()
 {
     // Initialise the alert script
     JHtmlBootstrap::button();
     // Get the document instance
     $document = JFactory::getDocument();
     $this->assertArrayHasKey('/media/jui/js/bootstrap.min.js', $document->_scripts, 'Verify that the button method initialises Bootstrap as well');
     $this->assertEquals($document->_script['text/javascript'], "(function(\$){" . PHP_EOL . "\t\t\t\t\$('.button').button();" . PHP_EOL . "\t\t\t\t})(jQuery);", 'Verify that the button script is initialised');
 }