Skip to content

Commit 560b063

Browse files
committed
Merge branch 'handling-attributes'
2 parents a549762 + 7f922da commit 560b063

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

tests/attributesTest.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,6 @@
88

99
class HtmlAttributesTest extends TestCase
1010
{
11-
public function testValidateAttributesValidInput()
12-
{
13-
$options = [
14-
'shared' => ['data-attribute' => 'my-attr-value', 'style' => ['background: red;']],
15-
'eager' => ['data-src' => 'image-eager.jpg'],
16-
'lazy' => [],
17-
];
18-
19-
// Expect no exception
20-
$this->expectNotToPerformAssertions();
21-
22-
validateAttributes($options);
23-
}
24-
25-
public function testValidateAttributesAllowsAllAttributes()
26-
{
27-
// All attributes are now allowed and can be overridden by users
28-
$options = [
29-
'shared' => ['type' => 'image/jpeg', 'data-attribute' => 'my-attr-value', 'style' => ['background: red;']],
30-
'eager' => ['data-src' => 'image-eager.jpg', 'srcset' => 'image-eager.jpg'],
31-
'lazy' => ['loading' => 'lazy', 'src' => 'image-lazy.jpg'],
32-
];
33-
34-
// Expect no exception
35-
$this->expectNotToPerformAssertions();
36-
37-
validateAttributes($options);
38-
}
39-
4011
public function testValidateAttributeTypesInvalidInput()
4112
{
4213
$this->expectExceptionMessage('[kirby-imagex] Type mismatch detected: attribute "style" in "shared" expected to be array, string given.');

0 commit comments

Comments
 (0)