| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function testPaginationWithSimpleArithmetic() |
||
| 18 | { |
||
| 19 | $article = new CmsArticle; |
||
| 20 | $article->topic = 'Test SimpleArithmetic ORDER BY'; |
||
| 21 | $article->text = 'This test fails on MySQL.'; |
||
| 22 | |||
| 23 | $this->_em->persist($article); |
||
| 24 | $this->_em->flush(); |
||
| 25 | |||
| 26 | $query = $this->_em->createQuery('SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a ORDER BY a.topic + 0 ASC'); |
||
| 27 | $query->setFirstResult(0); |
||
| 28 | $query->setMaxResults(1); |
||
| 29 | |||
| 30 | $paginator = new Paginator($query, true); |
||
| 31 | $paginator->setUseOutputWalkers(false); |
||
| 32 | $this->assertEquals(1, count(iterator_to_array($paginator))); |
||
| 33 | } |
||
| 35 |