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