Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
use Test\Tool\BaseTestCase;
use Knp\Component\Pager\Paginator;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Knp\Component\Pager\Pagination\PaginationInterface;
use Knp\Component\Pager\Event\Subscriber\Paginate\PaginationSubscriber;
class PaginatorTest extends BaseTestCase
{
/**
* @test
* @expectedException RuntimeException
*/
function shouldNotBeAbleToPaginateWithoutListeners()
{
$p = new Paginator(new EventDispatcher);
$p->paginate(array());
}
/**
* @test
* @expectedException RuntimeException
*/
function shouldFailToPaginateUnsupportedValue()
{
$dispatcher = new EventDispatcher;
$dispatcher->addSubscriber(new PaginationSubscriber);
$p = new Paginator($dispatcher);
$view = $p->paginate(null, 1, 10);
}
}