svn:eol-style native
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 1 Jun 2010 16:31:56 +0000 (16:31 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 1 Jun 2010 16:31:56 +0000 (16:31 +0000)
maintenance/tests/selenium/LocalSeleniumSettings.php.sample
maintenance/tests/selenium/SimpleSeleniumTest.php

index a4dfeea..86606e6 100644 (file)
@@ -1,51 +1,51 @@
-<?php\r
-// This template file contains variables that should be localized.\r
-// The line (specifying the location of the PHP/PEAR libraries) must be\r
-// first. Moving it to a position later in the file will almost certainly\r
-// cause an error.\r
-\r
-// In order to use this file, first copy it to LocalSeleniumSettings.php.\r
-// Then edit the information to conform to the local environment. You\r
-// will almost certainly have to uncomment the line set_include_path ... and\r
-// change the string 'PEAR' to the path to your PEAR library, e.g.,\r
-// '/usr/share/php/PEAR' for a Debian based Linux system.\r
-// The edited file must appear in the same directory as does RunSeleniumTests.php.\r
-\r
-// include path. Set 'PEAR" to '/path/to/PEAR/library'\r
-\r
-// URL: http://localhost/tests/RunSeleniumTests.php\r
-#set_include_path( get_include_path() . PATH_SEPARATOR . 'PEAR' );\r
-\r
-// Hostname of selenium server\r
-$wgSeleniumTestsSeleniumHost = 'localhost';\r
-\r
-// URL of the wiki to be tested. Consult web server configuration.\r
-$wgSeleniumTestsWikiUrl = 'http://localhost';\r
-\r
-// Port used by selenium server (optional - default is 4444)\r
-$wgSeleniumServerPort = 4444;\r
-\r
-// Wiki login. Used by Selenium to log onto the wiki\r
-$wgSeleniumTestsWikiUser      = 'Wikisysop';\r
-$wgSeleniumTestsWikiPassword  = 'password';\r
-\r
-// Common browsers on Windows platform. Modify for other platforms or\r
-// other Windows browsers\r
-// Use the *chrome handler in order to be able to test file uploads\r
-// further solution suggestions: http://www.brokenbuild.com/blog/2007/06/07/testing-file-uploads-with-selenium-rc-and-firefoxor-reducing-javascript-security-in-firefox-for-fun-and-profit/\r
-// $wgSeleniumTestsBrowsers['firefox']   = '*firefox c:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe';\r
-$wgSeleniumTestsBrowsers['firefox']   = '*firefox /usr/bin/firefox';\r
-$wgSeleniumTestsBrowsers['iexplorer'] = '*iexploreproxy';\r
-$wgSeleniumTestsBrowsers['opera']   = '*chrome /usr/bin/opera';\r
-\r
-// Actually, use this browser\r
-$wgSeleniumTestsUseBrowser = 'firefox';\r
-\r
-// Set command line mode\r
-$wgSeleniumTestsRunMode = 'cli';\r
-\r
-// List of tests to be included by default\r
-$wgSeleniumTestIncludes = array(\r
-       'selenium/SimpleSeleniumTest.php'\r
-);\r
+<?php
+// This template file contains variables that should be localized.
+// The line (specifying the location of the PHP/PEAR libraries) must be
+// first. Moving it to a position later in the file will almost certainly
+// cause an error.
+
+// In order to use this file, first copy it to LocalSeleniumSettings.php.
+// Then edit the information to conform to the local environment. You
+// will almost certainly have to uncomment the line set_include_path ... and
+// change the string 'PEAR' to the path to your PEAR library, e.g.,
+// '/usr/share/php/PEAR' for a Debian based Linux system.
+// The edited file must appear in the same directory as does RunSeleniumTests.php.
+
+// include path. Set 'PEAR" to '/path/to/PEAR/library'
+
+// URL: http://localhost/tests/RunSeleniumTests.php
+#set_include_path( get_include_path() . PATH_SEPARATOR . 'PEAR' );
+
+// Hostname of selenium server
+$wgSeleniumTestsSeleniumHost = 'localhost';
+
+// URL of the wiki to be tested. Consult web server configuration.
+$wgSeleniumTestsWikiUrl = 'http://localhost';
+
+// Port used by selenium server (optional - default is 4444)
+$wgSeleniumServerPort = 4444;
+
+// Wiki login. Used by Selenium to log onto the wiki
+$wgSeleniumTestsWikiUser      = 'Wikisysop';
+$wgSeleniumTestsWikiPassword  = 'password';
+
+// Common browsers on Windows platform. Modify for other platforms or
+// other Windows browsers
+// Use the *chrome handler in order to be able to test file uploads
+// further solution suggestions: http://www.brokenbuild.com/blog/2007/06/07/testing-file-uploads-with-selenium-rc-and-firefoxor-reducing-javascript-security-in-firefox-for-fun-and-profit/
+// $wgSeleniumTestsBrowsers['firefox']   = '*firefox c:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe';
+$wgSeleniumTestsBrowsers['firefox']   = '*firefox /usr/bin/firefox';
+$wgSeleniumTestsBrowsers['iexplorer'] = '*iexploreproxy';
+$wgSeleniumTestsBrowsers['opera']   = '*chrome /usr/bin/opera';
+
+// Actually, use this browser
+$wgSeleniumTestsUseBrowser = 'firefox';
+
+// Set command line mode
+$wgSeleniumTestsRunMode = 'cli';
+
+// List of tests to be included by default
+$wgSeleniumTestIncludes = array(
+       'selenium/SimpleSeleniumTest.php'
+);
 ?>
\ No newline at end of file
index c002ecf..aaf276b 100644 (file)
@@ -1,31 +1,31 @@
-<?php\r
-\r
-if (!defined('MEDIAWIKI') || !defined('SELENIUMTEST')) {\r
-       echo "This script cannot be run standalone";\r
-       exit(1);\r
-}\r
-\r
-// create test suite\r
-$wgSeleniumTestSuites['SimpleSeleniumTest'] = new SeleniumTestSuite('Simple Selenium Test');\r
-$wgSeleniumTestSuites['SimpleSeleniumTest']->addTest(new SimpleSeleniumTest());\r
-\r
-class SimpleSeleniumTest extends SeleniumTestCase\r
-{\r
-       public $name = "Basic selenium test";\r
-\r
-       public function runTest()\r
-       {\r
-               global $wgSeleniumTestsWikiUrl;\r
-               $this->open($wgSeleniumTestsWikiUrl.'/index.php?title=Selenium&action=edit');\r
-               $this->type("wpTextbox1", "This is a basic test");\r
-               $this->click("wpPreview");\r
-               $this->waitForPageToLoad(10000);\r
-\r
-               // check result\r
-               $source = $this->getText("//div[@id='wikiPreview']/p");\r
-               $correct = strstr($source, "This is a basic test");\r
-               $this->assertEquals($correct, true);\r
-\r
-       }\r
-\r
+<?php
+
+if (!defined('MEDIAWIKI') || !defined('SELENIUMTEST')) {
+       echo "This script cannot be run standalone";
+       exit(1);
+}
+
+// create test suite
+$wgSeleniumTestSuites['SimpleSeleniumTest'] = new SeleniumTestSuite('Simple Selenium Test');
+$wgSeleniumTestSuites['SimpleSeleniumTest']->addTest(new SimpleSeleniumTest());
+
+class SimpleSeleniumTest extends SeleniumTestCase
+{
+       public $name = "Basic selenium test";
+
+       public function runTest()
+       {
+               global $wgSeleniumTestsWikiUrl;
+               $this->open($wgSeleniumTestsWikiUrl.'/index.php?title=Selenium&action=edit');
+               $this->type("wpTextbox1", "This is a basic test");
+               $this->click("wpPreview");
+               $this->waitForPageToLoad(10000);
+
+               // check result
+               $source = $this->getText("//div[@id='wikiPreview']/p");
+               $correct = strstr($source, "This is a basic test");
+               $this->assertEquals($correct, true);
+
+       }
+
 }
\ No newline at end of file