@@ -954,7 +956,7 @@ public function testHReviewRelTag() {
$this->assertContains('Garçon', $output['items'][0]['properties']['category']);
}
- public function testHReviewItemVevent()
+ public function testHReviewItemVevent(): void
{
$input = '
out of 5 stars
@@ -978,7 +980,7 @@ public function testHReviewItemVevent()
$this->assertArrayHasKey('url', $properties);
}
- public function testHReviewItemHproduct()
+ public function testHReviewItemHproduct(): void
{
$input = '
out of 5 stars
@@ -1006,7 +1008,7 @@ public function testHReviewItemHproduct()
* Should return the last non-empty URL segment
* @see https://github.com/indieweb/php-mf2/issues/157
*/
- public function testRelTagTrailingSlash() {
+ public function testRelTagTrailingSlash(): void {
$input = '
Testing,
Microformats
@@ -1032,7 +1034,7 @@ public function testRelTagTrailingSlash() {
* Upgrade multiple mf1 roots on the same element
* @see https://github.com/indieweb/php-mf2/issues/156
*/
- public function testBackcompatMultipleRoots() {
+ public function testBackcompatMultipleRoots(): void {
$input = '
h-entry name
h-event name
@@ -1051,7 +1053,7 @@ public function testBackcompatMultipleRoots() {
/**
* @see https://github.com/microformats/php-mf2/issues/195
*/
- public function testVcardGeoNoImpliedName() {
+ public function testVcardGeoNoImpliedName(): void {
$input = '
John Doe
Location: Brighton
@@ -1065,7 +1067,7 @@ public function testVcardGeoNoImpliedName() {
/**
* @see https://github.com/microformats/php-mf2/issues/184
*/
- public function testVeventLocationVcardProperty() {
+ public function testVeventLocationVcardProperty(): void {
// Note: The venue for IWC 2012 no longer exists so we switched
// this to Powell's since it's a long-term Portland institution
$input = '
@@ -1094,7 +1096,7 @@ public function testVeventLocationVcardProperty() {
/**
* @see https://github.com/microformats/php-mf2/issues/184
*/
- public function testVeventLocationAdrProperty() {
+ public function testVeventLocationAdrProperty(): void {
// date fix, see: https://cpj.org/2012/10/cpj-impact-43/
// "second annual Online Press Freedom Summit in San Francisco on October 10"
$input = '
@@ -1113,7 +1115,7 @@ public function testVeventLocationAdrProperty() {
/**
* @see https://github.com/microformats/php-mf2/issues/184
*/
- public function testVeventLocationProperty() {
+ public function testVeventLocationProperty(): void {
// date fix, see: https://cpj.org/2012/10/cpj-impact-43/
// "second annual Online Press Freedom Summit in San Francisco on October 10"
$input = '
diff --git a/tests/Mf2/CombinedMicroformatsTest.php b/tests/Mf2/CombinedMicroformatsTest.php
index ae0638b..90f7a3b 100644
--- a/tests/Mf2/CombinedMicroformatsTest.php
+++ b/tests/Mf2/CombinedMicroformatsTest.php
@@ -1,5 +1,7 @@
@@ -75,7 +77,7 @@ public function testHEventLocationHCard() {
/**
* From https://microformats.org/wiki/microformats2#combining_microformats
*/
- public function testHCardOrgPOrg() {
+ public function testHCardOrgPOrg(): void {
$input = '
@@ -219,7 +221,7 @@ public function testHCardChildHCard() {
* This was occurring because mfPropertyNamesFromClass was only ever returning the first property name
* rather than all of them.
*/
- public function testNestedMicroformatUnderMultipleProperties() {
+ public function testNestedMicroformatUnderMultipleProperties(): void {
$input = ' ';
$mf = Mf2\parse($input);
@@ -232,7 +234,7 @@ public function testNestedMicroformatUnderMultipleProperties() {
*
* @see https://github.com/indieweb/php-mf2/issues/64
*/
- public function testMicroformatsNestedUnderEPropertyClassnamesRetainHtmlKey() {
+ public function testMicroformatsNestedUnderEPropertyClassnamesRetainHtmlKey(): void {
$input = 'Hello
';
$mf = Mf2\parse($input);
@@ -245,13 +247,13 @@ public function testMicroformatsNestedUnderEPropertyClassnamesRetainHtmlKey() {
/**
* Test microformats nested under u-* property classnames derive value: key from parsing as u-*
*/
- public function testMicroformatsNestedUnderUPropertyClassnamesDeriveValueCorrectly() {
+ public function testMicroformatsNestedUnderUPropertyClassnamesDeriveValueCorrectly(): void {
$input = '
';
$mf = Mf2\parse($input);
$this->assertEquals($mf['items'][0]['properties']['url'][0]['value'], 'This should be the value', json_encode($mf['items'][0]['properties']['url'][0]));
}
- public function testMicroformatsNestedUnderUPropertyClassnamesDeriveValueFromURL() {
+ public function testMicroformatsNestedUnderUPropertyClassnamesDeriveValueFromURL(): void {
$input = '
Name
Hello World
@@ -302,7 +304,7 @@ public function testMicroformatsNestedUnderUPropertyClassnamesDeriveValueFromURL
$this->assertEquals($mf['items'][0]['properties']['comment'][0]['properties']['author'][0]['value'], 'https://jane.example.com/');
}
- public function testMicroformatsNestedUnderPPropertyClassnamesDeriveValueFromFirstPName() {
+ public function testMicroformatsNestedUnderPPropertyClassnamesDeriveValueFromFirstPName(): void {
$input = '';
$mf = Mf2\parse($input);
@@ -314,7 +316,7 @@ public function testMicroformatsNestedUnderPPropertyClassnamesDeriveValueFromFir
* @see https://github.com/indieweb/php-mf2/issues/98
* @see https://github.com/microformats/tests/issues/58
*/
- public function testNoValueForNestedMicroformatWithoutProperty() {
+ public function testNoValueForNestedMicroformatWithoutProperty(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -330,7 +332,7 @@ public function testNoValueForNestedMicroformatWithoutProperty() {
* I fixed that but then wanted to ensure it worked beyond 1-level deep. This example
* is contrived, but lets me test to confirm 'children' is set correctly. - Gregor Morrill
*/
- public function testNestedMf1() {
+ public function testNestedMf1(): void {
$input = ' Jane Doe and John Doe ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -345,7 +347,7 @@ public function testNestedMf1() {
$this->assertEquals('John Doe', $child_mf['children'][0]['properties']['name'][0]);
}
- public function testNoUrlFromRelOnMf2() {
+ public function testNoUrlFromRelOnMf2(): void {
$input = <<< END
@@ -365,7 +367,7 @@ public function testNoUrlFromRelOnMf2() {
* Whitespace cleaned up for easier test assertion
* @see https://github.com/indieweb/php-mf2/issues/151
*/
- public function testNestedValuePProperty() {
+ public function testNestedValuePProperty(): void {
$input = <<< END
@@ -385,7 +387,7 @@ public function testNestedValuePProperty() {
/**
* @see https://github.com/indieweb/php-mf2/issues/151
*/
- public function testNestedValueDTProperty() {
+ public function testNestedValueDTProperty(): void {
$input = <<< END
1997-12-12
@@ -402,7 +404,7 @@ public function testNestedValueDTProperty() {
* rel=tag should not be upgraded within microformats2
* @see https://github.com/indieweb/php-mf2/issues/157
*/
- public function testMf2DoesNotParseRelTag() {
+ public function testMf2DoesNotParseRelTag(): void {
$input = '
@@ -422,7 +424,7 @@ public function testMf2DoesNotParseRelTag() {
* JSON-mode should return an empty stdClass when a microformat has no properties.
* @see https://github.com/indieweb/php-mf2/issues/171
*/
- public function testEmptyPropertiesObjectInJSONMode() {
+ public function testEmptyPropertiesObjectInJSONMode(): void {
$input = '';
// Try in JSON-mode: expect the raw PHP to be an stdClass instance that serializes to an empty object.
$parser = new Parser($input, null, true);
diff --git a/tests/Mf2/MicroformatsTestSuiteTest.php b/tests/Mf2/MicroformatsTestSuiteTest.php
index 9a90ede..6ec279f 100644
--- a/tests/Mf2/MicroformatsTestSuiteTest.php
+++ b/tests/Mf2/MicroformatsTestSuiteTest.php
@@ -1,16 +1,19 @@
tagName) and in_array(strtolower($el->tagName), $excludeTags)) {
+ if ($el->tagName and in_array(strtolower($el->tagName), $excludeTags)) {
return '';
}
@@ -18,6 +21,7 @@ public function textContent(\DOMElement $el, $dummy = false) {
$clonedEl = $el->cloneNode(true);
+ /** @var DOMElement $imgEl */
foreach ($this->xpath->query('.//img', $clonedEl) as $imgEl) {
if ($imgEl->hasAttribute('alt')) {
$replacement = $imgEl->getAttribute('alt');
@@ -31,6 +35,7 @@ public function textContent(\DOMElement $el, $dummy = false) {
}
foreach ($excludeTags as $tagName) {
+ /** @var DOMElement $elToRemove */
foreach ($this->xpath->query(".//{$tagName}", $clonedEl) as $elToRemove) {
$elToRemove->parentNode->removeChild($elToRemove);
}
@@ -40,8 +45,8 @@ public function textContent(\DOMElement $el, $dummy = false) {
}
// Hack. Old textContent requires "resolveChildUrls", but that method is private.
- private $__resolveChildUrls = null;
- private function _resolveChildUrls(\DOMElement $element) {
+ private ?\ReflectionMethod $__resolveChildUrls = null;
+ private function _resolveChildUrls(\DOMElement $element): void {
if (null === $this->__resolveChildUrls) {
$reflectUpon = new \ReflectionClass($this);
$this->__resolveChildUrls = $reflectUpon->getMethod('resolveChildUrls');
@@ -49,7 +54,7 @@ private function _resolveChildUrls(\DOMElement $element) {
$this->__resolveChildUrls->setAccessible(true);
}
}
- return $this->__resolveChildUrls->invoke($this, $element);
+ $this->__resolveChildUrls->invoke($this, $element);
}
}
@@ -59,7 +64,7 @@ class MicroformatsTestSuiteTest extends TestCase
* @dataProvider mf1TestsProvider
* @group microformats/tests/mf1
*/
- public function testMf1FromTestSuite($input, $expectedOutput)
+ public function testMf1FromTestSuite(string $input, string $expectedOutput): void
{
$parser = new TestSuiteParser($input, 'http://example.com/');
$this->assertEquals(
@@ -72,7 +77,7 @@ public function testMf1FromTestSuite($input, $expectedOutput)
* @dataProvider mf2TestsProvider
* @group microformats/tests/mf2
*/
- public function testMf2FromTestSuite($input, $expectedOutput, $test)
+ public function testMf2FromTestSuite(string $input, string $expectedOutput, string $test): void
{
if ($test === 'h-event/time') {
$this->markTestIncomplete('This test does not match because we implement a proposed spec: https://github.com/microformats/microformats2-parsing/issues/4#issuecomment-373457720.');
@@ -89,7 +94,7 @@ public function testMf2FromTestSuite($input, $expectedOutput, $test)
* @dataProvider mixedTestsProvider
* @group microformats/tests/mixed
*/
- public function testMixedFromTestSuite($input, $expectedOutput)
+ public function testMixedFromTestSuite(string $input, string $expectedOutput): void
{
$parser = new TestSuiteParser($input, 'http://example.com/');
$this->assertEquals(
@@ -103,8 +108,11 @@ public function testMixedFromTestSuite($input, $expectedOutput)
* * We sort arrays by key, normalising them, because JSON objects are unordered.
* * We json_encode strings, and cut the starting and ending ", so PHPUnit better
* shows whitespace characters like tabs and newlines.
- **/
- public function makeComparible($array)
+ *
+ * @param array $array
+ * @return array
+ */
+ public function makeComparible(array $array): array
{
ksort($array);
foreach ($array as $key => $value) {
@@ -119,8 +127,10 @@ public function makeComparible($array)
/**
* Data provider lists all tests from a specific directory in mf2/tests.
- **/
- public function htmlAndJsonProvider($subFolder = '')
+ *
+ * @return array
+ */
+ public function htmlAndJsonProvider(string $subFolder = ''): array
{
// Get the actual wanted subfolder.
$subFolder = '/mf2/tests/tests' . $subFolder;
@@ -153,18 +163,26 @@ public function htmlAndJsonProvider($subFolder = '')
/**
* Following three functions are the actual dataProviders used by the test methods.
+ *
+ * @return array
*/
- public function mf1TestsProvider()
+ public function mf1TestsProvider(): array
{
return $this->htmlAndJsonProvider('/microformats-v1');
}
- public function mf2TestsProvider()
+ /**
+ * @return array
+ */
+ public function mf2TestsProvider(): array
{
return $this->htmlAndJsonProvider('/microformats-v2');
}
- public function mixedTestsProvider()
+ /**
+ * @return array
+ */
+ public function mixedTestsProvider(): array
{
return $this->htmlAndJsonProvider('/microformats-mixed');
}
diff --git a/tests/Mf2/MicroformatsWikiExamplesTest.php b/tests/Mf2/MicroformatsWikiExamplesTest.php
index d3d0777..9a7306f 100644
--- a/tests/Mf2/MicroformatsWikiExamplesTest.php
+++ b/tests/Mf2/MicroformatsWikiExamplesTest.php
@@ -4,6 +4,8 @@
* Tests of the parsing methods within mf2\Parser
*/
+declare (strict_types=1);
+
namespace Mf2\Parser\Test;
use Mf2\Parser;
@@ -25,7 +27,7 @@ protected function set_up() {
date_default_timezone_set('Europe/London');
}
- public function testHandlesEmptyStringsCorrectly() {
+ public function testHandlesEmptyStringsCorrectly(): void {
$input = '';
$expected = '{
"rels": {},
@@ -39,7 +41,7 @@ public function testHandlesEmptyStringsCorrectly() {
$this->assertJsonStringEqualsJsonString(json_encode($output), $expected);
}
- public function testHandlesNullCorrectly() {
+ public function testHandlesNullCorrectly(): void {
$input = null;
$expected = '{
"rels": {},
@@ -57,7 +59,7 @@ public function testHandlesNullCorrectly() {
/**
* From https://microformats.org/wiki/microformats-2
*/
- public function testSimplePersonReference() {
+ public function testSimplePersonReference(): void {
$input = 'Frances Berriman';
$expected = '{
"rels": {},
@@ -78,7 +80,7 @@ public function testSimplePersonReference() {
/**
* From https://microformats.org/wiki/microformats-2
*/
- public function testSimpleHyperlinkedPersonReference() {
+ public function testSimpleHyperlinkedPersonReference(): void {
$input = 'Ben Ward';
$expected = '{
"rels": {},
@@ -100,7 +102,7 @@ public function testSimpleHyperlinkedPersonReference() {
/**
* From https://microformats.org/wiki/microformats-2-implied-properties
*/
- public function testSimplePersonImage() {
+ public function testSimplePersonImage(): void {
$input = '
';
// Added root items key
$expected = '{
@@ -125,7 +127,7 @@ public function testSimplePersonImage() {
/**
* From https://microformats.org/wiki/microformats-2-implied-properties
*/
- public function testHyperlinkedImageNameAndPhotoProperties() {
+ public function testHyperlinkedImageNameAndPhotoProperties(): void {
$input = '
@@ -154,7 +156,7 @@ public function testHyperlinkedImageNameAndPhotoProperties() {
/**
* From https://microformats.org/wiki/microformats-2
*/
- public function testMoreDetailedPerson() {
+ public function testMoreDetailedPerson(): void {
$input = '
diff --git a/tests/Mf2/ParseDTTest.php b/tests/Mf2/ParseDTTest.php
index 29252de..107f06d 100644
--- a/tests/Mf2/ParseDTTest.php
+++ b/tests/Mf2/ParseDTTest.php
@@ -1,5 +1,7 @@
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -32,7 +34,7 @@ public function testParseDTHandlesImg() {
/**
* @group parseDT
*/
- public function testParseDTHandlesDataValueAttr() {
+ public function testParseDTHandlesDataValueAttr(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -44,7 +46,7 @@ public function testParseDTHandlesDataValueAttr() {
/**
* @group parseDT
*/
- public function testParseDTHandlesDataInnerHTML() {
+ public function testParseDTHandlesDataInnerHTML(): void {
$input = '2012-08-05T14:50';
$parser = new Parser($input);
$output = $parser->parse();
@@ -56,7 +58,7 @@ public function testParseDTHandlesDataInnerHTML() {
/**
* @group parseDT
*/
- public function testParseDTHandlesAbbrValueAttr() {
+ public function testParseDTHandlesAbbrValueAttr(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -68,7 +70,7 @@ public function testParseDTHandlesAbbrValueAttr() {
/**
* @group parseDT
*/
- public function testParseDTHandlesAbbrInnerHTML() {
+ public function testParseDTHandlesAbbrInnerHTML(): void {
$input = '2012-08-05T14:50';
$parser = new Parser($input);
$output = $parser->parse();
@@ -80,7 +82,7 @@ public function testParseDTHandlesAbbrInnerHTML() {
/**
* @group parseDT
*/
- public function testParseDTHandlesTimeDatetimeAttr() {
+ public function testParseDTHandlesTimeDatetimeAttr(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -92,7 +94,7 @@ public function testParseDTHandlesTimeDatetimeAttr() {
/**
* @group parseDT
*/
- public function testParseDTHandlesTimeDatetimeAttrWithZ() {
+ public function testParseDTHandlesTimeDatetimeAttrWithZ(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -104,7 +106,7 @@ public function testParseDTHandlesTimeDatetimeAttrWithZ() {
/**
* @group parseDT
*/
- public function testParseDTHandlesTimeDatetimeAttrWithTZOffset() {
+ public function testParseDTHandlesTimeDatetimeAttrWithTZOffset(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -116,7 +118,7 @@ public function testParseDTHandlesTimeDatetimeAttrWithTZOffset() {
/**
* @group parseDT
*/
- public function testParseDTHandlesTimeDatetimeAttrWithTZOffset2() {
+ public function testParseDTHandlesTimeDatetimeAttrWithTZOffset2(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -128,7 +130,7 @@ public function testParseDTHandlesTimeDatetimeAttrWithTZOffset2() {
/**
* @group parseDT
*/
- public function testParseDTHandlesTimeInnerHTML() {
+ public function testParseDTHandlesTimeInnerHTML(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -140,7 +142,7 @@ public function testParseDTHandlesTimeInnerHTML() {
/**
* @group parseDT
*/
- public function testParseDTHandlesInsDelDatetime() {
+ public function testParseDTHandlesInsDelDatetime(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -155,7 +157,7 @@ public function testParseDTHandlesInsDelDatetime() {
* @group parseDT
* @group valueClass
*/
- public function testYYYY_MM_DD__HH_MM() {
+ public function testYYYY_MM_DD__HH_MM(): void {
$input = '2012-10-07 at 21:18';
$parser = new Parser($input);
$output = $parser->parse();
@@ -168,7 +170,7 @@ public function testYYYY_MM_DD__HH_MM() {
* @group parseDT
* @group valueClass
*/
- public function testAbbrYYYY_MM_DD__HH_MM() {
+ public function testAbbrYYYY_MM_DD__HH_MM(): void {
$input = 'some day at 21:18';
$parser = new Parser($input);
$output = $parser->parse();
@@ -181,7 +183,7 @@ public function testAbbrYYYY_MM_DD__HH_MM() {
* @group parseDT
* @group valueClass
*/
- public function testYYYY_MM_DD__HHpm() {
+ public function testYYYY_MM_DD__HHpm(): void {
$input = '2012-10-07 at 9pm';
$parser = new Parser($input);
$output = $parser->parse();
@@ -194,7 +196,7 @@ public function testYYYY_MM_DD__HHpm() {
* @group parseDT
* @group valueClass
*/
- public function testYYYY_MM_DD__HH_MMpm() {
+ public function testYYYY_MM_DD__HH_MMpm(): void {
$input = '2012-10-07 at 9:00pm';
$parser = new Parser($input);
$output = $parser->parse();
@@ -207,7 +209,7 @@ public function testYYYY_MM_DD__HH_MMpm() {
* @group parseDT
* @group valueClass
*/
- public function testYYYY_MM_DD__HH_MM_SSpm() {
+ public function testYYYY_MM_DD__HH_MM_SSpm(): void {
$input = '2012-10-07 at 9:00:00pm';
$parser = new Parser($input);
$output = $parser->parse();
@@ -221,7 +223,7 @@ public function testYYYY_MM_DD__HH_MM_SSpm() {
* @group parseDT
* @group valueClass
*/
- public function testImpliedDTEndWithValueClass() {
+ public function testImpliedDTEndWithValueClass(): void {
$input = ' 2014-06-04 at 18:30 19:30 ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -237,7 +239,7 @@ public function testImpliedDTEndWithValueClass() {
* @group parseDT
* @group valueClass
*/
- public function testImpliedDTEndWithoutValueClass() {
+ public function testImpliedDTEndWithoutValueClass(): void {
$input = ' 2014-06-05 at 18:31 19:31 ';
$parser = new Parser($input);
@@ -254,7 +256,7 @@ public function testImpliedDTEndWithoutValueClass() {
* @group parseDT
* @group valueClass
*/
- public function testImpliedDTEndUsingNonValueClassDTStart() {
+ public function testImpliedDTEndUsingNonValueClassDTStart(): void {
$input = ' until 19:31 ';
$parser = new Parser($input);
@@ -270,7 +272,7 @@ public function testImpliedDTEndUsingNonValueClassDTStart() {
* @group parseDT
* @group valueClass
*/
- public function testDTStartOnly() {
+ public function testDTStartOnly(): void {
$input = ' 2014-06-06 at 18:32 ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -284,7 +286,7 @@ public function testDTStartOnly() {
* @group parseDT
* @group valueClass
*/
- public function testDTStartDateOnly() {
+ public function testDTStartDateOnly(): void {
$input = ' 2014-06-07 ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -298,7 +300,7 @@ public function testDTStartDateOnly() {
* This behavior is implied from "However the colons ":" separating the hours and minutes of any timezone offset are optional and discouraged in order to make it less likely that a timezone offset will be confused for a time."
* @see https://microformats.org/wiki/index.php?title=value-class-pattern&oldid=66473##However+the+colons
*/
- public function testNormalizeTZOffsetVCP() {
+ public function testNormalizeTZOffsetVCP(): void {
$input = '
, from
@@ -313,7 +315,7 @@ public function testNormalizeTZOffsetVCP() {
/**
* TZ offsets *not* normalized for non-VCP dates
*/
- public function testNoNormalizeTZOffset() {
+ public function testNoNormalizeTZOffset(): void {
$input = ' ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -325,7 +327,7 @@ public function testNoNormalizeTZOffset() {
/**
* @see https://github.com/indieweb/php-mf2/issues/115
*/
- public function testDoNotAddT() {
+ public function testDoNotAddT(): void {
$input = '
, from
@@ -341,7 +343,7 @@ public function testDoNotAddT() {
/**
* @see https://github.com/indieweb/php-mf2/issues/115
*/
- public function testPreserrveTIfAuthored() {
+ public function testPreserrveTIfAuthored(): void {
$input = ' ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -352,7 +354,7 @@ public function testPreserrveTIfAuthored() {
/**
* @see https://github.com/indieweb/php-mf2/issues/126
*/
- public function testDtVCPTimezone() {
+ public function testDtVCPTimezone(): void {
$input = '
HomebrewWebsiteClub Berlin will be next on
@@ -369,7 +371,7 @@ public function testDtVCPTimezone() {
/**
* @see https://github.com/indieweb/php-mf2/issues/126
*/
- public function testDtVCPTimezoneShort() {
+ public function testDtVCPTimezoneShort(): void {
$input = '
HomebrewWebsiteClub Berlin will be next on
@@ -386,7 +388,7 @@ public function testDtVCPTimezoneShort() {
/**
* @see https://github.com/indieweb/php-mf2/issues/126
*/
- public function testDtVCPTimezoneNoLeadingZero() {
+ public function testDtVCPTimezoneNoLeadingZero(): void {
$input = '
2017-06-17
@@ -407,7 +409,7 @@ public function testDtVCPTimezoneNoLeadingZero() {
/**
* @see https://github.com/microformats/microformats2-parsing/issues/4
*/
- public function testImplyTimezoneFromStart() {
+ public function testImplyTimezoneFromStart(): void {
$input = ' to ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -419,7 +421,7 @@ public function testImplyTimezoneFromStart() {
/**
* @see https://github.com/microformats/microformats2-parsing/issues/4
*/
- public function testImplyTimezoneFromEnd() {
+ public function testImplyTimezoneFromEnd(): void {
$input = ' to ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -431,7 +433,7 @@ public function testImplyTimezoneFromEnd() {
/**
*
*/
- public function testAMPMWithPeriods() {
+ public function testAMPMWithPeriods(): void {
$input = '
2017-06-11
@@ -452,7 +454,7 @@ public function testAMPMWithPeriods() {
/**
*
*/
- public function testAMPMWithoutPeriods() {
+ public function testAMPMWithoutPeriods(): void {
$input = '
2017-06-17
@@ -473,7 +475,7 @@ public function testAMPMWithoutPeriods() {
/**
*
*/
- public function testDtVCPTimeAndTimezone() {
+ public function testDtVCPTimeAndTimezone(): void {
$input = '
2017-06-17
@@ -494,7 +496,7 @@ public function testDtVCPTimeAndTimezone() {
/**
* @see https://github.com/indieweb/php-mf2/issues/147
*/
- public function testDtVCPMultipleDatesAndTimezones() {
+ public function testDtVCPMultipleDatesAndTimezones(): void {
$input = '
Multiple date and time values
@@ -521,7 +523,7 @@ public function testDtVCPMultipleDatesAndTimezones() {
/**
* @see https://github.com/indieweb/php-mf2/issues/149
*/
- public function testDtWithoutYear() {
+ public function testDtWithoutYear(): void {
$input = ' ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -533,7 +535,7 @@ public function testDtWithoutYear() {
* @see https://github.com/indieweb/php-mf2/issues/167
* @see https://github.com/microformats/mf2py/blob/master/test/examples/datetimes.html
*/
- public function testNormalizeOrdinalDate() {
+ public function testNormalizeOrdinalDate(): void {
$input = '
Ordinal date
When:
diff --git a/tests/Mf2/ParseHtmlIdTest.php b/tests/Mf2/ParseHtmlIdTest.php
index d00390c..5e3c5ab 100644
--- a/tests/Mf2/ParseHtmlIdTest.php
+++ b/tests/Mf2/ParseHtmlIdTest.php
@@ -1,4 +1,7 @@
Recent Articles
Lorem Ipsum
empty id should not be parsed
diff --git a/tests/Mf2/ParseImpliedTest.php b/tests/Mf2/ParseImpliedTest.php
index a11e400..7b97fa6 100644
--- a/tests/Mf2/ParseImpliedTest.php
+++ b/tests/Mf2/ParseImpliedTest.php
@@ -1,4 +1,7 @@
The Name';
$parser = new Parser($input);
$output = $parser->parse();
@@ -27,7 +30,7 @@ public function testParsesImpliedPNameFromNodeValue() {
$this->assertEquals('The Name', $output['items'][0]['properties']['name'][0]);
}
- public function testParsesImpliedPNameFromImgAlt() {
+ public function testParsesImpliedPNameFromImgAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -36,7 +39,7 @@ public function testParsesImpliedPNameFromImgAlt() {
$this->assertEquals('The Name', $output['items'][0]['properties']['name'][0]);
}
- public function testParsesImpliedPNameFromNestedImgAlt() {
+ public function testParsesImpliedPNameFromNestedImgAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -45,7 +48,7 @@ public function testParsesImpliedPNameFromNestedImgAlt() {
$this->assertEquals('The Name', $output['items'][0]['properties']['name'][0]);
}
- public function testParsesImpliedPNameFromDoublyNestedImgAlt() {
+ public function testParsesImpliedPNameFromDoublyNestedImgAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -54,7 +57,7 @@ public function testParsesImpliedPNameFromDoublyNestedImgAlt() {
$this->assertEquals('The Name', $output['items'][0]['properties']['name'][0]);
}
- public function testParsesImpliedUPhotoFromImgSrcWithoutAlt() {
+ public function testParsesImpliedUPhotoFromImgSrcWithoutAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -63,7 +66,7 @@ public function testParsesImpliedUPhotoFromImgSrcWithoutAlt() {
$this->assertEquals('https://example.com/img.png', $output['items'][0]['properties']['photo'][0]);
}
- public function testParsesImpliedUPhotoFromImgSrcWithEmptyAlt() {
+ public function testParsesImpliedUPhotoFromImgSrcWithEmptyAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -73,7 +76,7 @@ public function testParsesImpliedUPhotoFromImgSrcWithEmptyAlt() {
$this->assertEquals('', $output['items'][0]['properties']['photo'][0]['alt']);
}
- public function testParsesImpliedUPhotoFromImgSrcWithAlt() {
+ public function testParsesImpliedUPhotoFromImgSrcWithAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -83,7 +86,7 @@ public function testParsesImpliedUPhotoFromImgSrcWithAlt() {
$this->assertEquals('Example', $output['items'][0]['properties']['photo'][0]['alt']);
}
- public function testParsesImpliedUPhotoFromNestedImgSrc() {
+ public function testParsesImpliedUPhotoFromNestedImgSrc(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -96,7 +99,7 @@ public function testParsesImpliedUPhotoFromNestedImgSrc() {
$this->assertEquals( $return, $output['items'][0]['properties']['photo'][0]);
}
- public function testParsesImpliedUPhotoFromDoublyNestedImgSrc() {
+ public function testParsesImpliedUPhotoFromDoublyNestedImgSrc(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -128,7 +131,7 @@ public function testIgnoresDoublyNestedImgIfNotOnlyDoublyNestedChild() {
}
*/
- public function testParsesImpliedUUrlFromAHref() {
+ public function testParsesImpliedUUrlFromAHref(): void {
$input = 'Some Name';
$parser = new Parser($input);
$output = $parser->parse();
@@ -138,7 +141,7 @@ public function testParsesImpliedUUrlFromAHref() {
}
- public function testParsesImpliedUUrlFromNestedAHref() {
+ public function testParsesImpliedUUrlFromNestedAHref(): void {
$input = 'Some Name';
$parser = new Parser($input);
$output = $parser->parse();
@@ -147,7 +150,7 @@ public function testParsesImpliedUUrlFromNestedAHref() {
$this->assertEquals('https://example.com/', $output['items'][0]['properties']['url'][0]);
}
- public function testParsesImpliedUUrlWithExplicitName() {
+ public function testParsesImpliedUUrlWithExplicitName(): void {
$input = 'Some Name';
$parser = new Parser($input);
$output = $parser->parse();
@@ -156,7 +159,7 @@ public function testParsesImpliedUUrlWithExplicitName() {
$this->assertEquals('https://example.com/', $output['items'][0]['properties']['url'][0]);
}
- public function testParsesImpliedNameWithExplicitURL() {
+ public function testParsesImpliedNameWithExplicitURL(): void {
$input = 'Some Name';
$parser = new Parser($input);
$output = $parser->parse();
@@ -166,7 +169,7 @@ public function testParsesImpliedNameWithExplicitURL() {
$this->assertEquals('Some Name', $output['items'][0]['properties']['name'][0]);
}
- public function testMultipleImpliedHCards() {
+ public function testMultipleImpliedHCards(): void {
$input = 'Frances Berriman
Ben Ward
@@ -223,7 +226,7 @@ public function testMultipleImpliedHCards() {
}
/** as per https://github.com/indieweb/php-mf2/issues/37 */
- public function testParsesImpliedNameConsistentWithPName() {
+ public function testParsesImpliedNameConsistentWithPName(): void {
$inner = "Name \nand more";
$test = ' ' . $inner .' ' . $inner . ' ';
$result = Mf2\parse($test);
@@ -233,13 +236,13 @@ public function testParsesImpliedNameConsistentWithPName() {
/** @see https://github.com/indieweb/php-mf2/issues/6 */
- public function testParsesImpliedNameFromAbbrTitle() {
+ public function testParsesImpliedNameFromAbbrTitle(): void {
$input = 'BJW';
$result = Mf2\parse($input);
$this->assertEquals('Barnaby Walters', $result['items'][0]['properties']['name'][0]);
}
- public function testImpliedPhotoFromObject() {
+ public function testImpliedPhotoFromObject(): void {
$input = '';
$result = Mf2\parse($input);
@@ -252,7 +255,7 @@ public function testImpliedPhotoFromObject() {
* This *should* return the photo since h-x>img[src]:only-of-type:not[.h-*]
* @see https://indieweb.org/User:Tantek.com
*/
- public function testImpliedPhotoFromNestedImg() {
+ public function testImpliedPhotoFromNestedImg(): void {
$input = '
Tantek Çelik';
$result = Mf2\parse($input);
@@ -260,7 +263,7 @@ public function testImpliedPhotoFromNestedImg() {
$this->assertEquals('https://pbs.twimg.com/profile_images/423350922408767488/nlA_m2WH.jpeg', $result['items'][0]['properties']['photo'][0]);
}
- public function testIgnoredPhotoIfMultipleImg() {
+ public function testIgnoredPhotoIfMultipleImg(): void {
$input = '
';
$result = Mf2\parse($input);
@@ -271,7 +274,7 @@ public function testIgnoredPhotoIfMultipleImg() {
* Correcting previous test testIgnoresDoublyNestedImgIfNotOnlyDoublyNestedChild()
* This *should* return the photo since .h-x>object[data]:only-of-type:not[.h-*]
*/
- public function testImpliedPhotoFromNestedObject() {
+ public function testImpliedPhotoFromNestedObject(): void {
$input = ' Moar text
';
$result = Mf2\parse($input);
@@ -279,28 +282,28 @@ public function testImpliedPhotoFromNestedObject() {
$this->assertEquals('http://example/photo3.jpg', $result['items'][0]['properties']['photo'][0]);
}
- public function testIgnoredPhotoIfMultipleObject() {
+ public function testIgnoredPhotoIfMultipleObject(): void {
$input = ' ';
$result = Mf2\parse($input);
$this->assertArrayNotHasKey('photo', $result['items'][0]['properties']);
}
- public function testIgnoredPhotoIfNestedImgH() {
+ public function testIgnoredPhotoIfNestedImgH(): void {
$input = '
';
$result = Mf2\parse($input);
$this->assertArrayNotHasKey('photo', $result['items'][0]['properties']);
}
- public function testIgnoredPhotoIfNestedImgHasHClass() {
+ public function testIgnoredPhotoIfNestedImgHasHClass(): void {
$input = '
';
$result = Mf2\parse($input);
$this->assertArrayNotHasKey('photo', $result['items'][0]['properties']);
}
- public function testIgnoredPhotoIfNestedObjectHasHClass() {
+ public function testIgnoredPhotoIfNestedObjectHasHClass(): void {
$input = ' ';
$result = Mf2\parse($input);
@@ -310,7 +313,7 @@ public function testIgnoredPhotoIfNestedObjectHasHClass() {
/**
* @see https://github.com/indieweb/php-mf2/issues/176
*/
- public function testIgnoredPhotoImgInNestedH() {
+ public function testIgnoredPhotoImgInNestedH(): void {
$input = '
';
$result = Mf2\parse($input);
@@ -320,7 +323,7 @@ public function testIgnoredPhotoImgInNestedH() {
/**
* @see https://github.com/indieweb/php-mf2/issues/176
*/
- public function testIgnoredPhotoObjectInNestedH() {
+ public function testIgnoredPhotoObjectInNestedH(): void {
$input = ' ';
$result = Mf2\parse($input);
@@ -330,7 +333,7 @@ public function testIgnoredPhotoObjectInNestedH() {
/**
* @see https://github.com/indieweb/php-mf2/issues/190
*/
- public function testIgnoredMultiChildrenWithNestedPhotoImg() {
+ public function testIgnoredMultiChildrenWithNestedPhotoImg(): void {
$input = '';
$result = Mf2\parse($input);
@@ -340,7 +343,7 @@ public function testIgnoredMultiChildrenWithNestedPhotoImg() {
/**
* @see https://github.com/indieweb/php-mf2/issues/190
*/
- public function testIgnoredMultiChildrenWithNestedPhotoObject() {
+ public function testIgnoredMultiChildrenWithNestedPhotoObject(): void {
$input = '';
$result = Mf2\parse($input);
@@ -351,7 +354,7 @@ public function testIgnoredMultiChildrenWithNestedPhotoObject() {
* Imply properties only on explicit h-x class name root microformat element (no backcompat roots)
* @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
*/
- public function testBackcompatNoImpliedName() {
+ public function testBackcompatNoImpliedName(): void {
$input = ' blah blah blah
';
$result = Mf2\parse($input);
@@ -364,7 +367,7 @@ public function testBackcompatNoImpliedName() {
* Imply properties only on explicit h-x class name root microformat element (no backcompat roots)
* @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
*/
- public function testBackcompatNoImpliedPhoto() {
+ public function testBackcompatNoImpliedPhoto(): void {
$input = '
';
$result = Mf2\parse($input);
@@ -376,7 +379,7 @@ public function testBackcompatNoImpliedPhoto() {
* Imply properties only on explicit h-x class name root microformat element (no backcompat roots)
* @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
*/
- public function testBackcompatNoImpliedUrl() {
+ public function testBackcompatNoImpliedUrl(): void {
$input = ' Title blah blah blah
';
$result = Mf2\parse($input);
@@ -391,7 +394,7 @@ public function testBackcompatNoImpliedUrl() {
* @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
* @see https://github.com/microformats/php-mf2/issues/183
*/
- public function testNoImpliedUrl() {
+ public function testNoImpliedUrl(): void {
$input = '';
$result = Mf2\parse($input);
@@ -402,7 +405,7 @@ public function testNoImpliedUrl() {
* Do not use img src in implied p-name
* @see https://github.com/microformats/php-mf2/issues/180
*/
- public function testNoImgSrcImpliedName() {
+ public function testNoImgSrcImpliedName(): void {
$input = 'My Name 
';
$result = Mf2\parse($input);
@@ -413,7 +416,7 @@ public function testNoImgSrcImpliedName() {
/**
* @see https://github.com/microformats/php-mf2/issues/198
*/
- public function testNoImpliedPhotoWhenExplicitUProperty() {
+ public function testNoImpliedPhotoWhenExplicitUProperty(): void {
$input = ' Organization Name
';
$result = Mf2\parse($input);
@@ -423,7 +426,7 @@ public function testNoImpliedPhotoWhenExplicitUProperty() {
/**
* @see https://github.com/microformats/php-mf2/issues/198
*/
- public function testNoImpliedPhotoWhenNestedMicroformat() {
+ public function testNoImpliedPhotoWhenNestedMicroformat(): void {
$input = '
';
$result = Mf2\parse($input);
diff --git a/tests/Mf2/ParseLanguageTest.php b/tests/Mf2/ParseLanguageTest.php
index 1e7af0d..a9a7e85 100644
--- a/tests/Mf2/ParseLanguageTest.php
+++ b/tests/Mf2/ParseLanguageTest.php
@@ -1,5 +1,7 @@
*/
- public function testHtmlLangOnly()
+ public function testHtmlLangOnly(): void
{
$input = ' This test is in English. ';
$parser = new Parser($input);
@@ -33,7 +35,7 @@ public function testHtmlLangOnly()
/**
* Test with only h-entry lang
*/
- public function testHEntryLangOnly()
+ public function testHEntryLangOnly(): void
{
$input = ' This test is in English. ';
$parser = new Parser($input);
@@ -47,7 +49,7 @@ public function testHEntryLangOnly()
/**
* Test with different and h-entry lang
*/
- public function testHtmlAndHEntryLang()
+ public function testHtmlAndHEntryLang(): void
{
$input = ' Esta prueba está en español. ';
$parser = new Parser($input);
@@ -61,7 +63,7 @@ public function testHtmlAndHEntryLang()
/**
* Test HTML fragment with only h-entry lang
*/
- public function testFragmentHEntryLangOnly()
+ public function testFragmentHEntryLangOnly(): void
{
$input = 'This test is in English.';
$parser = new Parser($input);
@@ -75,7 +77,7 @@ public function testFragmentHEntryLangOnly()
/**
* Test HTML fragment with no lang
*/
- public function testFragmentHEntryNoLang()
+ public function testFragmentHEntryNoLang(): void
{
$input = 'This test is in English.';
$parser = new Parser($input);
@@ -88,7 +90,7 @@ public function testFragmentHEntryNoLang()
/**
* Test HTML fragment with no lang, loaded with loadXML()
*/
- public function testFragmentHEntryNoLangXML()
+ public function testFragmentHEntryNoLangXML(): void
{
$input = new \DOMDocument();
$input->loadXML('This test is in English.');
@@ -102,7 +104,7 @@ public function testFragmentHEntryNoLangXML()
* Test with different , h-entry lang, and h-entry without lang,
* which should inherit from the
*/
- public function testMultiLanguageInheritance()
+ public function testMultiLanguageInheritance(): void
{
$input = ' This test is in English. Esta prueba está en español. ';
$parser = new Parser($input);
@@ -119,7 +121,7 @@ public function testMultiLanguageInheritance()
* Test feed with .h-feed lang which contains multiple h-entries of different languages
* (or none specified), which should inherit from the .h-feed lang.
*/
- public function testMultiLanguageFeed()
+ public function testMultiLanguageFeed(): void
{
$input = ' Test Feed
This test is in English. Esta prueba está en español. Ce test est en français. ';
$parser = new Parser($input);
@@ -142,7 +144,7 @@ public function testMultiLanguageFeed()
/**
* Test with language specified in http-equiv Content-Language
*/
- public function testMetaContentLanguage()
+ public function testMetaContentLanguage(): void
{
$input = ' Esta prueba está en español. ';
$parser = new Parser($input);
@@ -157,7 +159,7 @@ public function testMetaContentLanguage()
* Test with real-world post on voxpelli.com
* @see http://voxpelli.com/2015/09/oberoende-sociala-webben-2015/
*/
- public function testVoxpelliCom()
+ public function testVoxpelliCom(): void
{
$input = <<< END
@@ -252,7 +254,7 @@ public function testVoxpelliCom()
/**
* @see https://github.com/indieweb/php-mf2/issues/96#issuecomment-304457341
*/
- public function testNoLangInParsedProperties() {
+ public function testNoLangInParsedProperties(): void {
$input = '
En svensk titel
With an english summary
diff --git a/tests/Mf2/ParsePTest.php b/tests/Mf2/ParsePTest.php
index 6129ff0..1a096d3 100644
--- a/tests/Mf2/ParsePTest.php
+++ b/tests/Mf2/ParsePTest.php
@@ -1,5 +1,7 @@
Example User
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -32,7 +34,7 @@ public function testParsePHandlesInnerText() {
/**
* @group parseP
*/
- public function testParsePHandlesImg() {
+ public function testParsePHandlesImg(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -44,7 +46,7 @@ public function testParsePHandlesImg() {
/**
* @group parseP
*/
- public function testParsePHandlesAbbr() {
+ public function testParsePHandlesAbbr(): void {
$input = '@example';
$parser = new Parser($input);
$output = $parser->parse();
@@ -56,7 +58,7 @@ public function testParsePHandlesAbbr() {
/**
* @group parseP
*/
- public function testParsePHandlesData() {
+ public function testParsePHandlesData(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -68,7 +70,7 @@ public function testParsePHandlesData() {
/**
* @group parseP
*/
- public function testParsePHandlesDataWithBlankValueAttribute() {
+ public function testParsePHandlesDataWithBlankValueAttribute(): void {
$input = 'Example User';
$parser = new Parser($input);
$output = $parser->parse();
@@ -80,7 +82,7 @@ public function testParsePHandlesDataWithBlankValueAttribute() {
/**
* @group parseP
*/
- public function testParsePReturnsEmptyStringForBrHr() {
+ public function testParsePReturnsEmptyStringForBrHr(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -90,7 +92,7 @@ public function testParsePReturnsEmptyStringForBrHr() {
$this->assertEquals('', $output['items'][0]['properties']['name'][0]);
}
- public function testParsesInputValue() {
+ public function testParsesInputValue(): void {
$input = '';
$result = Mf2\parse($input);
$this->assertEquals('https://example.com', $result['items'][0]['properties']['url'][0]);
@@ -100,7 +102,7 @@ public function testParsesInputValue() {
* @see https://github.com/indieweb/php-mf2/issues/53
* @see https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property
*/
- public function testConvertsNestedImgElementToAltOrSrc() {
+ public function testConvertsNestedImgElementToAltOrSrc(): void {
$input = <<
The day I saw a 
@@ -115,7 +117,7 @@ public function testConvertsNestedImgElementToAltOrSrc() {
/**
* @see https://github.com/indieweb/php-mf2/issues/69
*/
- public function testBrWhitespaceIssue69() {
+ public function testBrWhitespaceIssue69(): void {
$input = 'Street Name 9
12345 NY, USA
';
$result = Mf2\parse($input);
@@ -130,7 +132,7 @@ public function testBrWhitespaceIssue69() {
/**
* @see https://github.com/indieweb/php-mf2/issues/89
*/
- public function testEmptyAlt() {
+ public function testEmptyAlt(): void {
$input = '';
$result = Mf2\parse($input);
diff --git a/tests/Mf2/ParseUTest.php b/tests/Mf2/ParseUTest.php
index 97a57a5..1402de1 100644
--- a/tests/Mf2/ParseUTest.php
+++ b/tests/Mf2/ParseUTest.php
@@ -1,4 +1,7 @@
Awesome example website ';
$parser = new Parser($input);
$output = $parser->parse();
@@ -30,7 +33,7 @@ public function testParseUHandlesA() {
/**
* @group parseU
*/
- public function testParseUHandlesEmptyHrefAttribute() {
+ public function testParseUHandlesEmptyHrefAttribute(): void {
$input = '';
$parser = new Parser($input, 'https://example.com/');
$output = $parser->parse();
@@ -42,7 +45,7 @@ public function testParseUHandlesEmptyHrefAttribute() {
/**
* @group parseU
*/
- public function testParseUHandlesMissingHrefAttribute() {
+ public function testParseUHandlesMissingHrefAttribute(): void {
$input = '';
$parser = new Parser($input, 'https://example.com/');
$output = $parser->parse();
@@ -54,7 +57,7 @@ public function testParseUHandlesMissingHrefAttribute() {
/**
* @group parseU
*/
- public function testParseUHandlesImg() {
+ public function testParseUHandlesImg(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -66,7 +69,7 @@ public function testParseUHandlesImg() {
/**
* @group parseU
*/
- public function testParseUHandlesImgwithAlt() {
+ public function testParseUHandlesImgwithAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -82,7 +85,7 @@ public function testParseUHandlesImgwithAlt() {
/**
* @group parseU
*/
- public function testParseUHandlesImgwithoutAlt() {
+ public function testParseUHandlesImgwithoutAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -94,7 +97,7 @@ public function testParseUHandlesImgwithoutAlt() {
/**
* @group parseU
*/
- public function testParseUHandlesArea() {
+ public function testParseUHandlesArea(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -106,7 +109,7 @@ public function testParseUHandlesArea() {
/**
* @group parseU
*/
- public function testParseUHandlesObject() {
+ public function testParseUHandlesObject(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -118,7 +121,7 @@ public function testParseUHandlesObject() {
/**
* @group parseU
*/
- public function testParseUHandlesAbbr() {
+ public function testParseUHandlesAbbr(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -130,7 +133,7 @@ public function testParseUHandlesAbbr() {
/**
* @group parseU
*/
- public function testParseUHandlesAbbrNoTitle() {
+ public function testParseUHandlesAbbrNoTitle(): void {
$input = 'no title attribute';
$parser = new Parser($input);
$output = $parser->parse();
@@ -142,7 +145,7 @@ public function testParseUHandlesAbbrNoTitle() {
/**
* @group parseU
*/
- public function testParseUHandlesData() {
+ public function testParseUHandlesData(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -154,7 +157,7 @@ public function testParseUHandlesData() {
/**
* @group baseUrl
*/
- public function testResolvesRelativeUrlsFromDocumentUrl() {
+ public function testResolvesRelativeUrlsFromDocumentUrl(): void {
$input = '
';
$parser = new Parser($input, 'https://example.com/things/more/more.html');
$output = $parser->parse();
@@ -165,7 +168,7 @@ public function testResolvesRelativeUrlsFromDocumentUrl() {
/**
* @group baseUrl
*/
- public function testResolvesRelativeUrlsFromBaseUrl() {
+ public function testResolvesRelativeUrlsFromBaseUrl(): void {
$input = '
';
$parser = new Parser($input, 'https://example.com/things/more.html');
$output = $parser->parse();
@@ -176,7 +179,7 @@ public function testResolvesRelativeUrlsFromBaseUrl() {
/**
* @group baseUrl
*/
- public function testResolvesRelativeUrlsInImpliedMicroformats() {
+ public function testResolvesRelativeUrlsInImpliedMicroformats(): void {
$input = '
';
$parser = new Parser($input, 'https://example.com/things/more.html');
$output = $parser->parse();
@@ -187,7 +190,7 @@ public function testResolvesRelativeUrlsInImpliedMicroformats() {
/**
* @group baseUrl
*/
- public function testResolvesRelativeBaseRelativeUrlsInImpliedMicroformats() {
+ public function testResolvesRelativeBaseRelativeUrlsInImpliedMicroformats(): void {
$input = '
';
$parser = new Parser($input, 'https://example.com/');
$output = $parser->parse();
@@ -196,7 +199,7 @@ public function testResolvesRelativeBaseRelativeUrlsInImpliedMicroformats() {
}
/** @see https://github.com/indieweb/php-mf2/issues/33 */
- public function testParsesHrefBeforeValueClass() {
+ public function testParsesHrefBeforeValueClass(): void {
$input = 'WRONG';
$result = Mf2\parse($input);
$this->assertEquals('https://example.com/right', $result['items'][0]['properties']['url'][0]);
@@ -205,7 +208,7 @@ public function testParsesHrefBeforeValueClass() {
/**
* @group parseU
*/
- public function testParseUHandlesAudio() {
+ public function testParseUHandlesAudio(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -217,7 +220,7 @@ public function testParseUHandlesAudio() {
/**
* @group parseU
*/
- public function testParseUHandlesVideo() {
+ public function testParseUHandlesVideo(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -229,7 +232,7 @@ public function testParseUHandlesVideo() {
/**
* @group parseU
*/
- public function testParseUHandlesVideoNoSrc() {
+ public function testParseUHandlesVideoNoSrc(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -241,7 +244,7 @@ public function testParseUHandlesVideoNoSrc() {
/**
* @group parseU
*/
- public function testParseUHandlesSource() {
+ public function testParseUHandlesSource(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -254,7 +257,7 @@ public function testParseUHandlesSource() {
/**
* @group parseU
*/
- public function testParseUHandlesVideoPoster() {
+ public function testParseUHandlesVideoPoster(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -267,7 +270,7 @@ public function testParseUHandlesVideoPoster() {
/**
* @group parseU
*/
- public function testParseUWithSpaces() {
+ public function testParseUWithSpaces(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -279,7 +282,7 @@ public function testParseUWithSpaces() {
/**
* @see https://github.com/indieweb/php-mf2/issues/130
*/
- public function testImpliedUWithEmptyHref() {
+ public function testImpliedUWithEmptyHref(): void {
$input = 'Jane Doe
@@ -304,7 +307,7 @@ public function testImpliedUWithEmptyHref() {
$this->assertEquals('https://example.com/', $output['items'][4]['children'][0]['properties']['url'][0]);
}
- public function testValueFromLinkTag() {
+ public function testValueFromLinkTag(): void {
$input = <<< END
@@ -325,7 +328,7 @@ public function testValueFromLinkTag() {
$this->assertEquals('Example.com homepage', $output['items'][0]['properties']['name'][0]);
}
- public function testResolveFromDataElement() {
+ public function testResolveFromDataElement(): void {
$parser = new Parser('', 'https://example.com/index.html');
$output = $parser->parse();
@@ -336,7 +339,7 @@ public function testResolveFromDataElement() {
/**
* @see https://github.com/microformats/php-mf2/issues/182
*/
- public function testResolveFromIframeElement() {
+ public function testResolveFromIframeElement(): void {
$input = '
Title
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -25,7 +27,7 @@ public function testValueClassTitleHandlesSingleValueClass() {
$this->assertEquals('Name', $output['items'][0]['properties']['name'][0]);
}
- public function testValueClassTitleHandlesMultipleValueClass() {
+ public function testValueClassTitleHandlesMultipleValueClass(): void {
$input = 'Name (this should not be included) Endname
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -34,7 +36,7 @@ public function testValueClassTitleHandlesMultipleValueClass() {
$this->assertEquals('NameEndname', $output['items'][0]['properties']['name'][0]);
}
- public function testValueClassTitleHandlesSingleValueTitle() {
+ public function testValueClassTitleHandlesSingleValueTitle(): void {
$input = 'Wrong Name (this should not be included)
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -43,7 +45,7 @@ public function testValueClassTitleHandlesSingleValueTitle() {
$this->assertEquals('Real Name', $output['items'][0]['properties']['name'][0]);
}
- public function testValueClassTitleHandlesMultipleValueTitle() {
+ public function testValueClassTitleHandlesMultipleValueTitle(): void {
$input = 'Wrong Name (this should not be included)
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -55,7 +57,7 @@ public function testValueClassTitleHandlesMultipleValueTitle() {
/**
* @see https://github.com/indieweb/php-mf2/issues/25
*/
- public function testValueClassDatetimeWorksWithUrlProperties() {
+ public function testValueClassDatetimeWorksWithUrlProperties(): void {
$input = <<
/**
* @see https://github.com/indieweb/php-mf2/issues/27
*/
- public function testParsesValueTitleDatetimes() {
+ public function testParsesValueTitleDatetimes(): void {
$input = <<
test
@@ -92,7 +94,7 @@ public function testParsesValueTitleDatetimes() {
}
/** @see https://github.com/indieweb/php-mf2/issues/34 */
- public function testIgnoresValueClassNestedFurtherThanChild() {
+ public function testIgnoresValueClassNestedFurtherThanChild(): void {
$test = '12345678';
$result = Mf2\parse($test);
$this->assertEquals('1234', $result['items'][0]['properties']['tel'][0]);
@@ -100,7 +102,7 @@ public function testIgnoresValueClassNestedFurtherThanChild() {
}
/** @see https://github.com/indieweb/php-mf2/issues/38 */
- public function testValueClassDtMatchesSingleDigitTimeComponent() {
+ public function testValueClassDtMatchesSingleDigitTimeComponent(): void {
$test = ', ';
$result = Mf2\parse($test);
$this->assertEquals('2013-02-01 6:01', $result['items'][0]['properties']['published'][0]);
diff --git a/tests/Mf2/ParserTest.php b/tests/Mf2/ParserTest.php
index a6cd9d4..9702c2e 100644
--- a/tests/Mf2/ParserTest.php
+++ b/tests/Mf2/ParserTest.php
@@ -1,7 +1,11 @@
assertEquals('thing', Mf2\unicodeTrim(' thing '));
$this->assertEquals('thing', Mf2\unicodeTrim(' thing '));
$this->assertEquals('thing', Mf2\unicodeTrim(mb_convert_encoding(' thing ', 'UTF-8', 'HTML-ENTITIES') ));
}
- public function testMicroformatNameFromClassReturnsFullRootName() {
+ public function testMicroformatNameFromClassReturnsFullRootName(): void {
$expected = array('h-card');
$actual = Mf2\mfNamesFromClass('someclass h-card someotherclass', 'h-');
$this->assertEquals($expected, $actual);
}
- public function testMicroformatNameFromClassHandlesMultipleHNames() {
+ public function testMicroformatNameFromClassHandlesMultipleHNames(): void {
$expected = array('h-card', 'h-person');
$actual = Mf2\mfNamesFromClass('someclass h-card someotherclass h-person yetanotherclass', 'h-');
$this->assertEquals($expected, $actual);
}
- public function testMicroformatStripsPrefixFromPropertyClassname() {
+ public function testMicroformatStripsPrefixFromPropertyClassname(): void {
$expected = array('name');
$actual = Mf2\mfNamesFromClass('someclass p-name someotherclass', 'p-');
$this->assertEquals($expected, $actual);
}
- public function testNestedMicroformatPropertyNameWorks() {
+ public function testNestedMicroformatPropertyNameWorks(): void {
$expected = array('location' => array('p-'), 'author' => array('u-', 'p-'));
$test = 'someclass p-location someotherclass u-author p-author';
$actual = Mf2\nestedMfPropertyNamesFromClass($test);
@@ -60,14 +64,14 @@ public function testNestedMicroformatPropertyNameWorks() {
$this->assertEqualsCanonicalizing($expected, $actual);
}
- public function testMicroformatNamesFromClassIgnoresPrefixesWithoutNames() {
+ public function testMicroformatNamesFromClassIgnoresPrefixesWithoutNames(): void {
$expected = array();
$actual = Mf2\mfNamesFromClass('someclass h- someotherclass', 'h-');
$this->assertEquals($expected, $actual);
}
- public function testMicroformatNamesFromClassHandlesExcessiveWhitespace() {
+ public function testMicroformatNamesFromClassHandlesExcessiveWhitespace(): void {
$expected = array('h-card');
$actual = Mf2\mfNamesFromClass(' someclass
h-card someotherclass ', 'h-');
@@ -75,14 +79,14 @@ public function testMicroformatNamesFromClassHandlesExcessiveWhitespace() {
$this->assertEquals($expected, $actual);
}
- public function testMicroformatNamesFromClassIgnoresUppercaseClassnames() {
+ public function testMicroformatNamesFromClassIgnoresUppercaseClassnames(): void {
$expected = array();
$actual = Mf2\mfNamesFromClass('H-ENTRY', 'h-');
$this->assertEquals($expected, $actual);
}
- public function testParseE() {
+ public function testParseE(): void {
$input = 'Here is a load of embedded markup';
//$parser = new Parser($input);
$output = Mf2\parse($input);
@@ -92,7 +96,7 @@ public function testParseE() {
$this->assertEquals('Here is a load of embedded markup', $output['items'][0]['properties']['content'][0]['value']);
}
- public function testParseEmptyE() {
+ public function testParseEmptyE(): void {
$input = 'Name ';
//$parser = new Parser($input);
$output = Mf2\parse($input);
@@ -103,7 +107,7 @@ public function testParseEmptyE() {
$this->assertEquals('', $output['items'][0]['properties']['content'][0]['value']);
}
- public function testParseEResolvesRelativeLinks() {
+ public function testParseEResolvesRelativeLinks(): void {
$input = 'Blah blah thing. 
';
$parser = new Parser($input, 'https://example.com');
$output = $parser->parse();
@@ -112,7 +116,7 @@ public function testParseEResolvesRelativeLinks() {
$this->assertEquals('Blah blah thing. https://example.com/img', $output['items'][0]['properties']['content'][0]['value']);
}
- public function testParseEWithBR() {
+ public function testParseEWithBR(): void {
$input = 'Here is content with two lines.
The br tag should not be converted to an XML br/br element.';
//$parser = new Parser($input);
$output = Mf2\parse($input);
@@ -122,7 +126,7 @@ public function testParseEWithBR() {
$this->assertEquals('Here is content with two lines.'."\n".'The br tag should not be converted to an XML br/br element.', $output['items'][0]['properties']['content'][0]['value']);
}
- public function testParseEWithWhitespace() {
+ public function testParseEWithWhitespace(): void {
$input = '
This leading and trailing whitespace should be removed from the HTML and text values.
@@ -139,7 +143,7 @@ public function testParseEWithWhitespace() {
/**
* @group parseH
*/
- public function testInvalidClassnamesContainingHAreIgnored() {
+ public function testInvalidClassnamesContainingHAreIgnored(): void {
$classname = 'asdfgh-jkl';
$input = sprintf('', $classname);
$parser = new Parser($input);
@@ -157,11 +161,11 @@ public function testInvalidClassnamesContainingHAreIgnored() {
$this->assertEquals(0, $matches, sprintf('Class name "%s" should not have parsed as a root microformat', $classname));
}
- public function testHtmlSpecialCharactersWorks() {
+ public function testHtmlSpecialCharactersWorks(): void {
$this->assertEquals('<>', htmlspecialchars('<>'));
}
- public function testHtmlEncodesNonEProperties() {
+ public function testHtmlEncodesNonEProperties(): void {
$input = '
<p>
<dt>
@@ -177,7 +181,7 @@ public function testHtmlEncodesNonEProperties() {
}
- public function testHtmlEncodesImpliedProperties() {
+ public function testHtmlEncodesImpliedProperties(): void {
$input = '
<name>';
$parser = new Parser($input);
$output = $parser->parse();
@@ -191,7 +195,7 @@ public function testHtmlEncodesImpliedProperties() {
$this->assertEquals($result, $output['items'][0]['properties']['photo'][0]);
}
- public function testParsesRelValues() {
+ public function testParsesRelValues(): void {
$input = 'Mr. Author';
$parser = new Parser($input);
@@ -201,7 +205,7 @@ public function testParsesRelValues() {
$this->assertEquals('https://example.com', $output['rels']['author'][0]);
}
- public function testParsesRelAlternateValues() {
+ public function testParsesRelAlternateValues(): void {
$input = 'German Homepage';
$parser = new Parser($input);
$parser->enableAlternates = true;
@@ -217,7 +221,7 @@ public function testParsesRelAlternateValues() {
$this->assertEquals('German Homepage', $output['alternates'][0]['text']);
}
- public function testParseFromIdOnlyReturnsMicroformatsWithinThatId() {
+ public function testParseFromIdOnlyReturnsMicroformatsWithinThatId(): void {
$input = <<Not Included
@@ -238,7 +242,7 @@ public function testParseFromIdOnlyReturnsMicroformatsWithinThatId() {
/**
* Issue #21 github.com/indieweb/php-mf2/issues/21
*/
- public function testDoesntAddArraysWithOnlyValueForAlreadyParsedNestedMicroformats() {
+ public function testDoesntAddArraysWithOnlyValueForAlreadyParsedNestedMicroformats(): void {
$input = <<
Hello
Name
Hello World
@@ -302,7 +304,7 @@ public function testMicroformatsNestedUnderUPropertyClassnamesDeriveValueFromURL $this->assertEquals($mf['items'][0]['properties']['comment'][0]['properties']['author'][0]['value'], 'https://jane.example.com/'); } - public function testMicroformatsNestedUnderPPropertyClassnamesDeriveValueFromFirstPName() { + public function testMicroformatsNestedUnderPPropertyClassnamesDeriveValueFromFirstPName(): void { $input = '
';
// Added root items key
$expected = '{
@@ -125,7 +127,7 @@ public function testSimplePersonImage() {
/**
* From https://microformats.org/wiki/microformats-2-implied-properties
*/
- public function testHyperlinkedImageNameAndPhotoProperties() {
+ public function testHyperlinkedImageNameAndPhotoProperties(): void {
$input = '
@@ -154,7 +156,7 @@ public function testHyperlinkedImageNameAndPhotoProperties() {
/**
* From https://microformats.org/wiki/microformats-2
*/
- public function testMoreDetailedPerson() {
+ public function testMoreDetailedPerson(): void {
$input = '
diff --git a/tests/Mf2/ParseDTTest.php b/tests/Mf2/ParseDTTest.php
index 29252de..107f06d 100644
--- a/tests/Mf2/ParseDTTest.php
+++ b/tests/Mf2/ParseDTTest.php
@@ -1,5 +1,7 @@
Multiple date and time values
@@ -521,7 +523,7 @@ public function testDtVCPMultipleDatesAndTimezones() { /** * @see https://github.com/indieweb/php-mf2/issues/149 */ - public function testDtWithoutYear() { + public function testDtWithoutYear(): void { $input = 'Ordinal date
When: diff --git a/tests/Mf2/ParseHtmlIdTest.php b/tests/Mf2/ParseHtmlIdTest.php index d00390c..5e3c5ab 100644 --- a/tests/Mf2/ParseHtmlIdTest.php +++ b/tests/Mf2/ParseHtmlIdTest.php @@ -1,4 +1,7 @@
Recent Articles
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -63,7 +66,7 @@ public function testParsesImpliedUPhotoFromImgSrcWithoutAlt() {
$this->assertEquals('https://example.com/img.png', $output['items'][0]['properties']['photo'][0]);
}
- public function testParsesImpliedUPhotoFromImgSrcWithEmptyAlt() {
+ public function testParsesImpliedUPhotoFromImgSrcWithEmptyAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -73,7 +76,7 @@ public function testParsesImpliedUPhotoFromImgSrcWithEmptyAlt() {
$this->assertEquals('', $output['items'][0]['properties']['photo'][0]['alt']);
}
- public function testParsesImpliedUPhotoFromImgSrcWithAlt() {
+ public function testParsesImpliedUPhotoFromImgSrcWithAlt(): void {
$input = '
';
$parser = new Parser($input);
$output = $parser->parse();
@@ -83,7 +86,7 @@ public function testParsesImpliedUPhotoFromImgSrcWithAlt() {
$this->assertEquals('Example', $output['items'][0]['properties']['photo'][0]['alt']);
}
- public function testParsesImpliedUPhotoFromNestedImgSrc() {
+ public function testParsesImpliedUPhotoFromNestedImgSrc(): void {
$input = '

Tantek Çelik';
$result = Mf2\parse($input);
@@ -260,7 +263,7 @@ public function testImpliedPhotoFromNestedImg() {
$this->assertEquals('https://pbs.twimg.com/profile_images/423350922408767488/nlA_m2WH.jpeg', $result['items'][0]['properties']['photo'][0]);
}
- public function testIgnoredPhotoIfMultipleImg() {
+ public function testIgnoredPhotoIfMultipleImg(): void {
$input = '
Moar text
blah blah blah
blah blah blah
My Name
Test Feed
En svensk titel
Example User
The day I saw a 
Street Name 9
12345 NY, USA





';
$parser = new Parser($input, 'https://example.com/things/more.html');
$output = $parser->parse();
@@ -187,7 +190,7 @@ public function testResolvesRelativeUrlsInImpliedMicroformats() {
/**
* @group baseUrl
*/
- public function testResolvesRelativeBaseRelativeUrlsInImpliedMicroformats() {
+ public function testResolvesRelativeBaseRelativeUrlsInImpliedMicroformats(): void {
$input = '
';
$parser = new Parser($input, 'https://example.com/');
$output = $parser->parse();
@@ -196,7 +199,7 @@ public function testResolvesRelativeBaseRelativeUrlsInImpliedMicroformats() {
}
/** @see https://github.com/indieweb/php-mf2/issues/33 */
- public function testParsesHrefBeforeValueClass() {
+ public function testParsesHrefBeforeValueClass(): void {
$input = 'WRONG';
$result = Mf2\parse($input);
$this->assertEquals('https://example.com/right', $result['items'][0]['properties']['url'][0]);
@@ -205,7 +208,7 @@ public function testParsesHrefBeforeValueClass() {
/**
* @group parseU
*/
- public function testParseUHandlesAudio() {
+ public function testParseUHandlesAudio(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -217,7 +220,7 @@ public function testParseUHandlesAudio() {
/**
* @group parseU
*/
- public function testParseUHandlesVideo() {
+ public function testParseUHandlesVideo(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -229,7 +232,7 @@ public function testParseUHandlesVideo() {
/**
* @group parseU
*/
- public function testParseUHandlesVideoNoSrc() {
+ public function testParseUHandlesVideoNoSrc(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -241,7 +244,7 @@ public function testParseUHandlesVideoNoSrc() {
/**
* @group parseU
*/
- public function testParseUHandlesSource() {
+ public function testParseUHandlesSource(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -254,7 +257,7 @@ public function testParseUHandlesSource() {
/**
* @group parseU
*/
- public function testParseUHandlesVideoPoster() {
+ public function testParseUHandlesVideoPoster(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -267,7 +270,7 @@ public function testParseUHandlesVideoPoster() {
/**
* @group parseU
*/
- public function testParseUWithSpaces() {
+ public function testParseUWithSpaces(): void {
$input = '';
$parser = new Parser($input);
$output = $parser->parse();
@@ -279,7 +282,7 @@ public function testParseUWithSpaces() {
/**
* @see https://github.com/indieweb/php-mf2/issues/130
*/
- public function testImpliedUWithEmptyHref() {
+ public function testImpliedUWithEmptyHref(): void {
$input = 'Jane Doe
@@ -304,7 +307,7 @@ public function testImpliedUWithEmptyHref() {
$this->assertEquals('https://example.com/', $output['items'][4]['children'][0]['properties']['url'][0]);
}
- public function testValueFromLinkTag() {
+ public function testValueFromLinkTag(): void {
$input = <<< END
@@ -325,7 +328,7 @@ public function testValueFromLinkTag() {
$this->assertEquals('Example.com homepage', $output['items'][0]['properties']['name'][0]);
}
- public function testResolveFromDataElement() {
+ public function testResolveFromDataElement(): void {
$parser = new Parser('', 'https://example.com/index.html');
$output = $parser->parse();
@@ -336,7 +339,7 @@ public function testResolveFromDataElement() {
/**
* @see https://github.com/microformats/php-mf2/issues/182
*/
- public function testResolveFromIframeElement() {
+ public function testResolveFromIframeElement(): void {
$input = 'Title
Name (this should not be included) Endname
Wrong Name (this should not be included)
Wrong Name (this should not be included)
test
@@ -92,7 +94,7 @@ public function testParsesValueTitleDatetimes() { } /** @see https://github.com/indieweb/php-mf2/issues/34 */ - public function testIgnoresValueClassNestedFurtherThanChild() { + public function testIgnoresValueClassNestedFurtherThanChild(): void { $test = 'Blah blah thing.
The br tag should not be converted to an XML br/br element.
mention.tech

+ 


+
+
+ Barnaby Walters





