From 083a43867485e18af872c2db3cb0a82361dedf5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thiemo=20M=C3=A4ttig?= Date: Thu, 28 Apr 2016 16:36:03 +0200 Subject: [PATCH] =?UTF-8?q?Rename=20Suffix=E2=80=A6=20to=20PrefixedEntityI?= =?UTF-8?q?dParser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ixEntityIdParser.php => PrefixedEntityIdParser.php} | 2 +- ...IdParserTest.php => PrefixedEntityIdParserTest.php} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/EntityId/{SuffixEntityIdParser.php => PrefixedEntityIdParser.php} (96%) rename tests/unit/EntityId/{SuffixEntityIdParserTest.php => PrefixedEntityIdParserTest.php} (83%) diff --git a/src/EntityId/SuffixEntityIdParser.php b/src/EntityId/PrefixedEntityIdParser.php similarity index 96% rename from src/EntityId/SuffixEntityIdParser.php rename to src/EntityId/PrefixedEntityIdParser.php index a20ddf18..ae841b83 100644 --- a/src/EntityId/SuffixEntityIdParser.php +++ b/src/EntityId/PrefixedEntityIdParser.php @@ -15,7 +15,7 @@ * @license GPL-2.0+ * @author Daniel Kinzler */ -class SuffixEntityIdParser implements EntityIdParser { +class PrefixedEntityIdParser implements EntityIdParser { /** * @var string diff --git a/tests/unit/EntityId/SuffixEntityIdParserTest.php b/tests/unit/EntityId/PrefixedEntityIdParserTest.php similarity index 83% rename from tests/unit/EntityId/SuffixEntityIdParserTest.php rename to tests/unit/EntityId/PrefixedEntityIdParserTest.php index b647bf00..9e74ab0c 100644 --- a/tests/unit/EntityId/SuffixEntityIdParserTest.php +++ b/tests/unit/EntityId/PrefixedEntityIdParserTest.php @@ -6,15 +6,15 @@ use Wikibase\DataModel\Entity\EntityIdParsingException; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\DataModel\Services\EntityId\SuffixEntityIdParser; +use Wikibase\DataModel\Services\EntityId\PrefixedEntityIdParser; /** - * @covers Wikibase\DataModel\Services\EntityId\SuffixEntityIdParser + * @covers Wikibase\DataModel\Services\EntityId\PrefixedEntityIdParser * * @license GPL-2.0+ * @author Daniel Kinzler */ -class SuffixEntityIdParserTest extends \PHPUnit_Framework_TestCase { +class PrefixedEntityIdParserTest extends \PHPUnit_Framework_TestCase { public function validInputProvider() { return [ @@ -27,7 +27,7 @@ public function validInputProvider() { * @dataProvider validInputProvider */ public function testParse( $prefix, $input, $expected ) { - $parser = new SuffixEntityIdParser( $prefix, new BasicEntityIdParser() ); + $parser = new PrefixedEntityIdParser( $prefix, new BasicEntityIdParser() ); $this->assertEquals( $expected, $parser->parse( $input ) ); } @@ -48,7 +48,7 @@ public function invalidInputProvider() { * @dataProvider invalidInputProvider */ public function testParse_invalid( $prefix, $input ) { - $parser = new SuffixEntityIdParser( $prefix, new BasicEntityIdParser() ); + $parser = new PrefixedEntityIdParser( $prefix, new BasicEntityIdParser() ); $this->setExpectedException( EntityIdParsingException::class ); $parser->parse( $input );