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 Aug 13, 2018
1 parent af2f208 commit 083a438
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 @@ -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 [
Expand All @@ -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 ) );
}

Expand All @@ -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 );
Expand Down

0 comments on commit 083a438

Please sign in to comment.