irukasano/phpunit-htmlhint

add assertion of phpunit with htmllint

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/irukasano/phpunit-htmlhint

v1.0.1 2022-08-15 07:24 UTC

This package is auto-updated.

Last update: 2025-09-16 11:10:29 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);
    }
}