irukasano / phpunit-htmlhint
add assertion of phpunit with htmllint
v1.0.1
2022-08-15 07:24 UTC
Requires
- php: >=5.6.0,<8.0.0
- vlucas/phpdotenv: 5.4.x-dev
Requires (Dev)
- phpunit/phpunit: ^5.7.14|^6.0
This package is auto-updated.
Last update: 2025-07-16 10:54:33 UTC
README
add phpunit assertion by htmlhint
install
install this library,
$ composer require irukasano/phpunit-htmlhint
and also needs to install htmlhint
$ sudo apt install nodejs npm $ sudo npm install n -g $ sudo n stable $ sudo npm install htmlhint -g
usage
cakephp3
in your testcase ( ex. tests/TestCase/PagesControllerTest.php ),
use PHPUnitHmtlhint\LintTestTrait; class PagesControllerTest extends TestCase { use IntegrationTestTrait; use LintTestTrait; public function test() { $this->get('/'); $html = $this->_response->getBody(); $this->assertHtmlhintOk($html); } }