Skip to content

irukasano/phpunit-htmlhint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpunit-htmlhint

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);
    }
}

About

add assertion of phpunit with htmlhint

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages