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);
 }
Beispiel #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();
 }