/** * Tests the modal method. * * @return void * * @since 3.6.0 */ public function testModal() { // Initialise the modal script JHtmlBootstrap::modal(); // 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($){ $("#modal").modal({"backdrop": true,"keyboard": true,"show": false,"remote": ""}); });', 'Verify that the modal script is initialised'); }