phpunit/phpunit-mink-trait 问题修复 & 功能扩展

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

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

phpunit/phpunit-mink-trait

最新稳定版本:2.0.0

Composer 安装命令:

composer require phpunit/phpunit-mink-trait

包简介

Trait that provides minimal integration layer for using Mink in PHPUnit test cases

README 文档

README

Trait that provides a minimal integration layer for using Mink (with the Goutte driver) in PHPUnit test cases.

The main goal of this project is to demonstrate how PHPUnit can be extended through traits.

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require phpunit/phpunit-mink-trait

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev phpunit/phpunit-mink-trait

Usage

<?php
use PHPUnit\Framework\TestCase;

class ExampleTest extends TestCase
{
    use phpunit\mink\TestCaseTrait;

    public function testHasCorrectTitle()
    {
        $page = $this->visit('http://example.com/');

        $this->assertContains(
            'Example Domain', $page->find('css', 'title')->getHtml()
        );
    }

    public function testMoreInformationCanBeAccessed()
    {
        $page = $this->visit('http://example.com/');
        $page->clickLink('More information...');

        $this->assertContains(
            'IANA', $page->find('css', 'title')->getHtml()
        );
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-10-15