Skip to content

Commit fb6d089

Browse files
committed
Rename Parser to TestSuiteParser
Travis was showing weird errors in PHP versions before 7.0 about duplicate name usage. Weird because the Parser class defined for the test should live in a completely separate namespace.
1 parent 4d46586 commit fb6d089

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/Mf2/MicroformatsTestSuiteTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Mf2\Parser\Test;
44

5-
final class Parser extends \Mf2\Parser
5+
final class TestSuiteParser extends \Mf2\Parser
66
{
77
/** Actually textContent from before the whitespace normalisation merge (e8da04f93d548d26287a8980eca4216639cbc61d) */
88
public function textContent(\DOMElement $el, $dummy=false) {
@@ -50,7 +50,7 @@ class MicroformatsTestSuiteTest extends \PHPUnit_Framework_TestCase
5050
*/
5151
public function testMf1FromTestSuite($input, $expectedOutput)
5252
{
53-
$parser = new Parser($input, 'http://example.com/');
53+
$parser = new TestSuiteParser($input, 'http://example.com/');
5454
$this->assertEquals(
5555
$this->makeComparible(json_decode($expectedOutput, true)),
5656
$this->makeComparible(json_decode(json_encode($parser->parse()), true))
@@ -63,7 +63,7 @@ public function testMf1FromTestSuite($input, $expectedOutput)
6363
*/
6464
public function testMf2FromTestSuite($input, $expectedOutput)
6565
{
66-
$parser = new Parser($input, 'http://example.com/');
66+
$parser = new TestSuiteParser($input, 'http://example.com/');
6767
$this->assertEquals(
6868
$this->makeComparible(json_decode($expectedOutput, true)),
6969
$this->makeComparible(json_decode(json_encode($parser->parse()), true))
@@ -76,7 +76,7 @@ public function testMf2FromTestSuite($input, $expectedOutput)
7676
*/
7777
public function testMixedFromTestSuite($input, $expectedOutput)
7878
{
79-
$parser = new Parser($input, 'http://example.com/');
79+
$parser = new TestSuiteParser($input, 'http://example.com/');
8080
$this->assertEquals(
8181
$this->makeComparible(json_decode($expectedOutput, true)),
8282
$this->makeComparible(json_decode(json_encode($parser->parse()), true))

0 commit comments

Comments
 (0)