public function testAliasesOfPropertiesWhichAreUsedMoreThanOnce()
 {
     $queryBuilder = new QueryBuilder(self::$prefixes + array('skos' => 'http://www.w3.org/2004/02/skos/core#'));
     $queryBuilder->select('?property', '?alias', '?occurences')->subquery($queryBuilder->newSubquery()->select('?alias', '(COUNT (?alias) AS ?occurences)')->where('?tmp', 'a', 'wikibase:Property')->also('skos:altLabel', '?alias')->filter('LANG (?alias) = "en"')->groupBy('?alias'))->where('?property', 'a', 'wikibase:Property')->also('skos:altLabel', '?alias')->filter('?occurences > 1')->orderBy('?alias');
     $this->assertIsExpected('Aliases_of_properties_which_are_used_more_than_once', $queryBuilder->format());
 }
 public function testNewSubquery()
 {
     $queryBuilder = new QueryBuilder(array('a' => 'b'));
     $this->assertEquals(new QueryBuilder(array('a' => 'b')), $queryBuilder->newSubquery());
 }