Esempio n. 1
0
 /**
  *  Create a tag query
  *
  *  Note : LookupEvent is fired by the model not this api
  *
  *  @access public
  *  @return DBALGateway\Container\SelectContainer
  */
 public function findTag()
 {
     return $this->mapper->find();
 }
Esempio n. 2
0
 /**
  *  @expectedException QuickTag\QuickTagException
  *  @expectedExceptionMessage SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tag_title' cannot be null
  */
 public function testSaveWithError()
 {
     $gateway = $this->getTableGateway();
     $event = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $mapper = new TagMapper($event, $gateway);
     $tag = new StoredTag();
     $tag->setUserContext(1);
     $tag->setWeight(1);
     $result = $mapper->save($tag);
 }