Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit d2a0424

Browse files
committed
Merge branch 'hotfix/5'
Close #5
2 parents 14319a0 + 7ab473d commit d2a0424

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file, in reverse
66

77
### Added
88

9-
- Nothing.
9+
- [#5](https://github.com/zendframework/zend-view/pull/5) adds support for the
10+
`itemprop` attribute in the `headLink()` view helper.
1011

1112
### Deprecated
1213

src/Helper/HeadLink.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class HeadLink extends Placeholder\Container\AbstractStandalone
4646
'sizes',
4747
'type',
4848
'title',
49-
'extras'
49+
'extras',
50+
'itemprop'
5051
];
5152

5253
/**

test/Helper/HeadLinkTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,4 +445,10 @@ public function testSizesAttributeIsSupported()
445445
$this->helper->appendStylesheet(['rel' => 'icon', 'href' => '/bar/baz', 'sizes' => '123x456']);
446446
$this->assertContains('sizes="123x456"', $this->helper->toString());
447447
}
448+
449+
public function testItempropAttributeIsSupported()
450+
{
451+
$this->helper->prependAlternate(['itemprop' => 'url', 'href' => '/bar/baz', 'rel' => 'canonical']);
452+
$this->assertContains('itemprop="url"', $this->helper->toString());
453+
}
448454
}

0 commit comments

Comments
 (0)