diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index dd84591..56c35b6 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -9,7 +9,7 @@ on: jobs: phpbench: name: "PHPBench" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" strategy: fail-fast: false @@ -30,7 +30,7 @@ jobs: - name: "Install dependencies with Composer" uses: "ramsey/composer-install@v2" - + - name: Run performance tests run: | php test/benchmark/run.php 10 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1ae2ed5..a9fd54a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ on: jobs: phpunit: name: "PHPUnit" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" strategy: fail-fast: false diff --git a/.github/workflows/cs.yaml b/.github/workflows/cs.yaml index 266666d..df375f9 100644 --- a/.github/workflows/cs.yaml +++ b/.github/workflows/cs.yaml @@ -9,7 +9,7 @@ on: jobs: php-cs-fixer: name: "php-cs-fixer" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" strategy: fail-fast: false @@ -25,7 +25,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - + - name: cs fix run: | wget -q https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.19.3/php-cs-fixer.phar diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php index 86401c7..87d71a4 100644 --- a/test/HTML5/Parser/TokenizerTest.php +++ b/test/HTML5/Parser/TokenizerTest.php @@ -970,22 +970,20 @@ public function testText() // ================================================================ // Utility functions. // ================================================================ - protected function createTokenizer($string, $debug = false) + protected function createTokenizer($string) { $eventHandler = new EventStack(); $scanner = new Scanner($string); - $scanner->debug = $debug; - return array( new Tokenizer($scanner, $eventHandler), $eventHandler, ); } - public function parse($string, $debug = false) + public function parse($string) { - list($tok, $events) = $this->createTokenizer($string, $debug); + list($tok, $events) = $this->createTokenizer($string); $tok->parse(); return $events; diff --git a/test/HTML5/Serializer/TraverserTest.php b/test/HTML5/Serializer/TraverserTest.php index 81dd444..09d7142 100644 --- a/test/HTML5/Serializer/TraverserTest.php +++ b/test/HTML5/Serializer/TraverserTest.php @@ -7,6 +7,11 @@ class TraverserTest extends \Masterminds\HTML5\Tests\TestCase { + /** + * @var \Masterminds\HTML5 + */ + protected $html5; + protected $markup = '