Skip to content

Commit

Permalink
Rename Suffix… to PrefixedEntityIdParser
Browse files Browse the repository at this point in the history
  • Loading branch information
thiemowmde committed Apr 28, 2016
1 parent 16dfc52 commit 6a9c7ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @license GPL-2.0+
* @author Daniel Kinzler
*/
class SuffixEntityIdParser implements EntityIdParser {
class PrefixedEntityIdParser implements EntityIdParser {

/**
* @var string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
use Wikibase\DataModel\Entity\BasicEntityIdParser;
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 array(
Expand All @@ -26,7 +26,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 ) );
}

Expand All @@ -47,7 +47,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( 'Wikibase\DataModel\Entity\EntityIdParsingException' );
$parser->parse( $input );
Expand Down

0 comments on commit 6a9c7ca

Please sign in to comment.