MediaWiki  REL1_19
MediaWikiRightFrameworkLinksTestCase.php
Go to the documentation of this file.
00001 <?php
00002 
00031 require_once (dirname(__FILE__).'/'.'MediaWikiInstallationCommonFunction.php');
00032 
00043 class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction {
00044 
00045     function setUp() {
00046         parent::setUp();
00047     }
00048 
00049     public function testLinksAvailability() {
00050 
00051         $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
00052 
00053         // Verify 'Read me' link availability
00054         $this->assertTrue($this->isElementPresent( "link=Read me" ));
00055 
00056         // Verify 'Release notes' link availability
00057         $this->assertTrue($this->isElementPresent( "link=Release notes" ));
00058 
00059         //  Verify 'Copying' link availability
00060         $this->assertTrue($this->isElementPresent( "link=Copying" ));
00061     }
00062 
00063     public function testPageNavigation() {
00064 
00065         $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
00066 
00067         // Navigate to the 'Read me' page
00068         $this->click( "link=Read me" );
00069         $this->waitForPageToLoad( PAGE_LOAD_TIME );
00070         $this->assertEquals( "Read me", $this->getText( LINK_DIV."h2[1]" ));
00071         $this->assertTrue($this->isElementPresent( "submit-back" ));
00072         parent::clickBackButton();
00073 
00074         // Navigate to the 'Release notes' page
00075         $this->click( "link=Release notes" );
00076         $this->waitForPageToLoad( PAGE_LOAD_TIME);
00077         $this->assertEquals( "Release notes", $this->getText( LINK_DIV."h2[1]" ));
00078         $this->assertTrue( $this->isElementPresent( "submit-back" ));
00079         parent::clickBackButton();
00080 
00081         // Navigate to the 'Copying' page
00082         $this->click( "link=Copying" );
00083         $this->waitForPageToLoad( PAGE_LOAD_TIME );
00084         $this->assertEquals( "Copying", $this->getText( LINK_DIV."h2[1]" ));
00085         $this->assertTrue($this->isElementPresent( "submit-back" ));
00086         parent::clickBackButton();
00087 
00088         // Navigate to the 'Upgrading' page
00089         $this->click( "link=Upgrading" );
00090         $this->waitForPageToLoad( PAGE_LOAD_TIME );
00091         $this->assertEquals( "Upgrading", $this->getText( LINK_DIV."h2[1]" ));
00092     }
00093 }