Skip to content

Commit

Permalink
Merge pull request #181 from Wikidata-lib/noNewFromNumber
Browse files Browse the repository at this point in the history
Avoid calling EntityId::newFromNumber when not needed
  • Loading branch information
mariushoch committed Nov 23, 2016
2 parents 7d18914 + 01a19e4 commit a156620
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public function setUp() {
}

public function testFilterSuggestions() {
$p7 = PropertyId::newFromNumber( 7 );
$p10 = PropertyId::newFromNumber( 10 );
$p12 = PropertyId::newFromNumber( 12 );
$p15 = PropertyId::newFromNumber( 15 );
$p23 = PropertyId::newFromNumber( 23 );
$p7 = new PropertyId( 'P7' );
$p10 = new PropertyId( 'P10' );
$p12 = new PropertyId( 'P12' );
$p15 = new PropertyId( 'P15' );
$p23 = new PropertyId( 'P23' );

$suggestions = array(
new Suggestion( $p12, 0.9 ), // this will stay at pos 0
Expand Down

0 comments on commit a156620

Please sign in to comment.