jenkins-bot has submitted this change and it was merged. Change subject: Fix other RDF tests on Windows ......................................................................
Fix other RDF tests on Windows This fixes the normalization method in the test to also trim all resulting array elements. On windows I presume \r is left at the end of every element causing the tests to fail.. With this trim call the tests now pass on windows See https://gerrit.wikimedia.org/r/#/c/226508/ Change-Id: I29087376a7bdfc40de3549c7ad7cecb615c9ee3a --- M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php M repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php 3 files changed, 3 insertions(+), 0 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php index f34d128..1105f39 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php @@ -109,6 +109,7 @@ $data = $builder->getRDF(); $dataSplit = explode( "\n", trim( $data ) ); sort( $dataSplit ); + $dataSplit = array_map( 'trim', $dataSplit ); return $dataSplit; } diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php index 90b9791..77ca78a 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php @@ -101,6 +101,7 @@ $data = trim( file_get_contents( $filename ) ); $data = explode( "\n", $data ); sort( $data ); + $data = array_map( 'trim', $data ); return $data; } diff --git a/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php index c222d1d..c9b7311 100644 --- a/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php @@ -71,6 +71,7 @@ $lines = explode( "\n", trim( $ntriples ) ); sort( $lines ); + $lines = array_map( 'trim', $lines ); return $lines; } -- To view, visit https://gerrit.wikimedia.org/r/227479 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29087376a7bdfc40de3549c7ad7cecb615c9ee3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Bene <benestar.wikime...@gmail.com> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits