Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getPoser($id)
 {
     $count = 'n/a';
     if ($downloads = $this->storage->fetch($id)) {
         $count = $this->normalizer->normalize($downloads);
     }
     return new PoserBadge('downloads', sprintf('%s last month', $count), '097ABB');
 }
 /**
  * @covers \espend\IdeaBadge\Poser\Provider\PoserLastMonthStorage::fetch
  */
 public function testThatLastMonthInvalidatesToNotAvailable()
 {
     $storage = new PoserLastMonthStorage($this->temp);
     static::assertNull($storage->fetch('8312'));
 }