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
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-10-15