uwdoem/test-suite 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

uwdoem/test-suite

Composer 安装命令:

composer require uwdoem/test-suite

包简介

README 文档

README

Build Status Code Climate Test Coverage Latest Stable Version

TestSuite

PHPUnit web test case class for UWDOEM projects using the Athens web framework.

Use

This library is published on packagist. To install using Composer, add the "uwdoem/test-suite": "0.*" line to your "require-dev" dependencies:

{
    "require-dev": {
        ...
        "uwdoem/test-suite": "0.*",
        ...
    }
}

Example

Below is an example test file which makes use of the WebTestCase class:

<?php

use UWDOEM\TestSuite\WebTestCase;

class WebTest extends WebTestCase
{

    /**
     * Initialize the browser window
     *
     * @return void
     */
    protected function setUp()
    {
        $this->setBrowser('firefox');
        $this->setBrowserUrl('http://localhost:8001/');
    }

    /**
     * A test class using WebTestCase shall be able to visit a page and retrieve
     * the title.
     *
     * @return void
     */
    public function testTitle()
    {
        $this->url('/form.php');
        $this->assertEquals('Form', $this->title());
    }
    
    /**
     * A test class using WebTestCase shall be able to fill a form with random
     * data, and submit.
     *
     * @return void
     */
    public function testFormFill()
    {
        $this->url('/form.php');
        $this->assertEquals('Form', $this->title());

        $values = $this->fillForm();

        $this->element($this->using('css selector')->value('input[type=submit]'))->click();

        $body = $this->element($this->using('css selector')->value('body'))->attribute('innerHTML');

        foreach ($values as $value) {
            $this->assertContains($value, $body);
        }
    }
    
}

统计信息

  • 总下载量: 106
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固