◆ getMockedTag()
| HtmlMetadataTest::getMockedTag |
( |
string |
$html | ) |
|
◆ setUp()
| HtmlMetadataTest::setUp |
( |
| ) |
|
|
protected |
◆ testEmptyTagCollection()
| HtmlMetadataTest::testEmptyTagCollection |
( |
| ) |
|
Definition at line 63 of file HtmlMetadataTest.php.
65 $tag_collection = $this->factory->collection([]);
67 $this->assertEmpty(iterator_to_array($tag_collection->getTags()));
68 $this->assertEmpty($tag_collection->toHtml());
◆ testNestedTagCollection()
| HtmlMetadataTest::testNestedTagCollection |
( |
| ) |
|
Definition at line 71 of file HtmlMetadataTest.php.
References getMockedTag().
73 $test_tag_1_html =
'test_tag_1_html';
76 $test_tag_2_html =
'test_tag_2_html';
79 $test_tag_3_html =
'test_tag_3_html';
82 $expected_html = $test_tag_1_html . PHP_EOL . $test_tag_2_html . PHP_EOL . $test_tag_3_html . PHP_EOL;
84 $tag_collection = $this->factory->collection([
85 $this->factory->collection([$test_tag_1, $test_tag_2]),
89 $this->assertCount(3, iterator_to_array($tag_collection->getTags()));
90 $this->assertEquals($expected_html, $tag_collection->toHtml());
◆ testNullTag()
| HtmlMetadataTest::testNullTag |
( |
| ) |
|
Definition at line 39 of file HtmlMetadataTest.php.
41 $null_tag = $this->factory->nullTag();
43 $this->assertInstanceOf(NullTag::class, $null_tag);
44 $this->assertEmpty($null_tag->toHtml());
◆ testTagCollection()
| HtmlMetadataTest::testTagCollection |
( |
| ) |
|
Definition at line 47 of file HtmlMetadataTest.php.
References getMockedTag().
49 $test_tag_1_html =
'test_tag_1_html';
52 $test_tag_2_html =
'test_tag_2_html';
55 $expected_html = $test_tag_1_html . PHP_EOL . $test_tag_2_html . PHP_EOL;
57 $tag_collection = $this->factory->collection([$test_tag_1, $test_tag_2]);
59 $this->assertCount(2, iterator_to_array($tag_collection->getTags()));
60 $this->assertEquals($expected_html, $tag_collection->toHtml());
◆ testUserDefinedTag()
| HtmlMetadataTest::testUserDefinedTag |
( |
| ) |
|
Definition at line 93 of file HtmlMetadataTest.php.
References ILIAS\LTI\ToolProvider\$key.
95 $key =
'expected_key';
96 $val =
'expected_value';
98 $user_defined_tag = $this->factory->userDefined(
$key, $val);
100 $this->assertInstanceOf(UserDefined::class, $user_defined_tag);
102 "<meta name=\"$key\" content=\"$val\" />",
103 $user_defined_tag->toHtml()
◆ $factory
The documentation for this class was generated from the following file: