phpunit/phpunit-dom-assertions
最新稳定版本:v3.7.0
Composer 安装命令:
composer require phpunit/phpunit-dom-assertions
包简介
DOM assertions for PHPUnit
README 文档
README
A work in progress, drop-in replacement for the following deprecated PHPUnit assertions:
assertSelectCount()assertSelectRegExp()assertXPathCount()assertXPathEquals()assertXPathSelectRegExp()assertSelectEquals()
Installation
$ composer require --dev phpunit/phpunit-dom-assertions
Usage
Extend PHPUnit\Framework\DOMTestCase to use the DOM assertions:
namespace My\Tests; use PHPUnit\Framework\DOMAssert; use PHPUnit\Framework\TestCase; final class DOMTest extends TestCase { public function testSelectEquals(): void { $html = file_get_contents('test.html'); $selector = 'span.test_class'; $content = 'Test Class Text'; DOMAssert::assertSelectEquals($selector, $content, true, $html); } }
License
The PHPUnit DOM assertions library is licensed under the BSD 3-Clause license.
统计信息
- 总下载量: 323.84k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 29
- 点击次数: 1
- 依赖项目数: 12
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-08-27