承接 buyplaytix/phantomjs-test 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2012-12-17