From 2894cca2c89bc891d8bc60da32e6c4f104d1717b Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Thu, 30 Jun 2022 11:22:51 -0400 Subject: [PATCH] failing test for af-tag --- .../tests/phpunit/Civi/Afform/SymbolsTest.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ext/afform/core/tests/phpunit/Civi/Afform/SymbolsTest.php b/ext/afform/core/tests/phpunit/Civi/Afform/SymbolsTest.php index e2560aa6d7..f81d8795eb 100644 --- a/ext/afform/core/tests/phpunit/Civi/Afform/SymbolsTest.php +++ b/ext/afform/core/tests/phpunit/Civi/Afform/SymbolsTest.php @@ -79,6 +79,24 @@ class SymbolsTest extends \PHPUnit\Framework\TestCase implements HeadlessInterfa ], ], ]; + $exs[] = [ + '
+ + + +
+
+ + + + +
', + [ + 'e' => ['div' => 2, 'af-field' => 7, 'body' => 1], + 'a' => ['class' => 2, 'name' => 7], + 'c' => ['af-container' => 2, 'af-layout-inline' => 2], + ], + ]; return $exs; } @@ -91,9 +109,14 @@ class SymbolsTest extends \PHPUnit\Framework\TestCase implements HeadlessInterfa * @dataProvider getExamples */ public function testSymbols($html, $expect): void { + // yes, 2 + \phpQuery::$debug = 2; $expectDefaults = ['e' => [], 'a' => [], 'c' => []]; $expect = array_merge($expectDefaults, $expect); + ob_start(); $actual = Symbols::scan($html); + ob_end_clean(); + \phpQuery::$debug = FALSE; $this->assertEquals($expect['e'], $actual->elements); $this->assertEquals($expect['a'], $actual->attributes); -- 2.25.1