buyplaytix/phantomjs-test
最新稳定版本:2.0
Composer 安装命令:
composer require buyplaytix/phantomjs-test
包简介
Allows PHPUnit to test using PhantomJS.
README 文档
README
Allows PHPUnit to test using PhantomJS.
A Basic Test
class BasicTest extends \PHPUnit_Framework_TestCase {
public function setUp() {
$this->driver = new \PhantomJS\Driver($this);
}
public function testPage() {
$html = "<html><body><h1>Hi</h1><script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"></script></body></html>";
$this->driver->assertTrue("h1 exists", "$('h1').length == 1");
$this->driver->assertTrue("h1 value is Hi", "$('h1').html() == 'Hi'");
$this->driver->test($html);
}
}
统计信息
- 总下载量: 1.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2012-12-17