Author: ornicar2
Date: 2010-01-18 17:53:48 +0100 (Mon, 18 Jan 2010)
New Revision: 26827
Modified:
plugins/diemPlugin/trunk/dmCorePlugin/test/project/test/unit/dmFrontPagerViewTest.php
Log:
[Diem]
- added unit test for dmFrontPagerView when nb_links = 0
Modified:
plugins/diemPlugin/trunk/dmCorePlugin/test/project/test/unit/dmFrontPagerViewTest.php
===================================================================
---
plugins/diemPlugin/trunk/dmCorePlugin/test/project/test/unit/dmFrontPagerViewTest.php
2010-01-18 16:49:40 UTC (rev 26826)
+++
plugins/diemPlugin/trunk/dmCorePlugin/test/project/test/unit/dmFrontPagerViewTest.php
2010-01-18 16:53:48 UTC (rev 26827)
@@ -12,7 +12,7 @@
->setPage(1)
->init();
-$t = new lime_test(15);
+$t = new lime_test(16);
$t->isa_ok($pager, 'dmDoctrinePager', 'Got a dmDoctrinePager instance');
@@ -85,4 +85,9 @@
$t->comment('With 100 records per page');
$pager->setPage(1)->setMaxPerPage(100);
-$t->is($navigation = $pager->renderNavigationTop(), '', 'navigation top:
'.$navigation);
\ No newline at end of file
+$t->is($navigation = $pager->renderNavigationTop(), '', 'navigation top:
'.$navigation);
+
+$t->comment('With nb_links = 0');
+$pager->setPage(1)->setMaxPerPage(5)->setOption('nb_links', 0);
+$pattern = '<div class="pager"><ul class="clearfix"><li class="page
next">.+</li></ul></div>';
+$t->like($navigation = $pager->renderNavigationTop(), '|^'.$pattern.'$|',
'navigation top: '.$navigation);
\ No newline at end of file
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.