Ejemplo n.º 1
0
 public function testMapperFind()
 {
     $gateway = $this->getTableGateway();
     $event = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $mapper = new TagMapper($event, $gateway);
     $this->assertInstanceOf('DBALGateway\\Container\\SelectContainer', $mapper->find());
     $result = $mapper->find()->where()->limit(10)->end()->find();
     $this->assertEquals(10, $result->count());
     $this->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $result);
 }
Ejemplo n.º 2
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();
 }