public function testGetFormat() { $mockFormatter = $this->getMockSnakFormatter('getFormat', 'TEST'); $acc = new HashUsageAccumulator(); $formatter = new UsageTrackingSnakFormatter($mockFormatter, $acc, array('ru', 'en')); $this->assertEquals('TEST', $formatter->getFormat(), 'getFormat'); $this->assertCount(0, $acc->getUsages()); }
public function testGetDescriptions() { $q1 = new ItemId('Q1'); $mockLookup = $this->getMockTermLookup('getDescriptions', $q1, array('en', 'de')); $acc = new HashUsageAccumulator(); $lookup = new UsageTrackingTermLookup($mockLookup, $acc); $lookup->getDescriptions($q1, array('en', 'de')); $this->assertCount(0, $acc->getUsages()); }