[UTIL][HTML] Move to a unified array

This commit is contained in:
2021-09-20 13:13:14 +01:00
parent e8f4563633
commit 8fe8687c5b
2 changed files with 15 additions and 25 deletions

View File

@@ -35,7 +35,7 @@ class HTMLTest extends WebTestCase
static::assertSame("<a href=\"test\">\n <p>\n </p>\n</a>\n", HTML::html(['a' => ['attrs' => ['href' => 'test'], 'p' => '']]));
static::assertSame("<a>\n <p>\n foo\n </p>\n <br/>\n</a>\n", HTML::html(['a' => ['p' => 'foo', 'br' => 'empty']]));
static::assertThrows(\InvalidArgumentException::class, fn () => HTML::html(1));
static::assertSame("<a href=\"test\">\n foo\n</a>", implode("\n", HTML::tag('a', ['href' => 'test'], content: 'foo', empty_tag: false)));
static::assertSame('<br/>', implode("\n", HTML::tag('br', attrs: null, content: null, empty_tag: true)));
static::assertSame("<a href=\"test\">\n foo\n</a>", implode("\n", HTML::tag('a', ['href' => 'test'], content: 'foo', options: ['empty' => false])));
static::assertSame('<br/>', implode("\n", HTML::tag('br', attrs: null, content: null, options: ['empty' => true])));
}
}