Example #1
0
 /**
  *  Find a tag by the ID
  *
  *  Note : LookupEvent is fired by the model not this api
  *
  *  @access public
  *  @return QuickTag\Model\StoredTag or null if none found
  *  @param integer $id
  *  @throws QuickTag\QuickTagException if database operation fails
  */
 public function lookupTag($id)
 {
     if (is_int($id) === false) {
         throw new QuickTagException('Tag Id must be an integer');
     }
     return $this->mapper->findByID($id);
 }
Example #2
0
 public function testFindByIdNoneFound()
 {
     $gateway = $this->getTableGateway();
     $event = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $mapper = new TagMapper($event, $gateway);
     $result = $mapper->findByID(101);
     $this->assertEquals(null, $result);
 }