cvs: pear /Selenium/tests Bug8891.php Bug8893.php
| From: | Shin OHNO | Date: | Thu, 12 Oct 2006 17:02:29 +0000 |
| Subject: | cvs: pear /Selenium/tests Bug8891.php Bug8893.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42502@lists.php.net to get a copy of this message | ||
shin Thu Oct 12 17:02:29 2006 UTC
Added files:
/pear/Selenium/tests Bug8891.php Bug8893.php
Log:
Added Bug TestCase
http://cvs.php.net/viewvc.cgi/pear/Selenium/tests/Bug8891.php?view=markup&rev=1.1
Index: pear/Selenium/tests/Bug8891.php
+++ pear/Selenium/tests/Bug8891.php
<?php
require_once '../Selenium.php';
require_once 'PHPUnit2/Framework/TestCase.php';
class Bug8891 extends PHPUnit2_Framework_TestCase
{
private $selenium;
public function __construct($name)
{
$this->browserUrl = "http://www.unchiku.com/";
$this->testUrl = $this->browserUrl . "tests";
parent::__construct($name);
}
// {{{ setUp and tearDown
public function setUp()
{
try {
$this->selenium = new Selenium("*firefox", $this->browserUrl);
$this->selenium->start();
} catch (Selenium_Exception $e) {
$this->selenium->stop();
echo $e;
}
}
public function tearDown()
{
try {
$this->selenium->stop();
} catch (Selenium_Exception $e) {
echo $e;
}
}
// }}}
// {{{ testOpen
public function test8893()
{
try {
$this->selenium->open("{$this->testUrl}/html/test_open.html");
// The default is glob
$this->assertFalse($this->selenium->isTextPresent('Foo'));
$this->assertTrue($this->selenium->isTextPresent('This*'));
$this->assertTrue($this->selenium->isTextPresent('This?is'));
$this->assertTrue($this->selenium->isTextPresent('T?????'));
// To use JavaScrpt regexp, speicify regexp: as follows:
$this->assertTrue($this->selenium->isTextPresent('regexp:^This'));
$this->assertTrue($this->selenium->isTextPresent('regexp:^Th.s'));
} catch (Selenium_Exception $e) {
$this->selenium->stop();
echo $e;
}
}
// }}}
}
?>
http://cvs.php.net/viewvc.cgi/pear/Selenium/tests/Bug8893.php?view=markup&rev=1.1
Index: pear/Selenium/tests/Bug8893.php
+++ pear/Selenium/tests/Bug8893.php
<?php
require_once '../Selenium.php';
require_once 'PHPUnit2/Framework/TestCase.php';
class Bug8893 extends PHPUnit2_Framework_TestCase
{
private $selenium;
public function __construct($name)
{
$this->browserUrl = "http://www.google.de/";
$this->testUrl = $this->browserUrl;
parent::__construct($name);
}
// {{{ setUp and tearDown
public function setUp()
{
try {
$this->selenium = new Selenium("*firefox", $this->browserUrl);
$this->selenium->start();
} catch (Selenium_Exception $e) {
$this->selenium->stop();
echo $e;
}
}
public function tearDown()
{
try {
$this->selenium->stop();
} catch (Selenium_Exception $e) {
echo $e;
}
}
// }}}
// {{{ testOpen
public function test8893()
{
try {
$this->selenium->open("{$this->testUrl}");
var_dump($this->selenium->getAllButtons());
} catch (Selenium_Exception $e) {
$this->selenium->stop();
echo $e;
}
}
// }}}
}
?>