add phpunit assertion by htmlhint
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
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);
}
}