Exemplo n.º 1
0
 public function testAddsMultipleAdapterPrefixPaths()
 {
     $paths = array('prefix3' => 'path3', 'prefix4' => 'path4', 'prefix5' => 'path5');
     Paginator\Paginator::addAdapterPrefixPaths($paths);
     $loader = Paginator\Paginator::getAdapterLoader();
     $paths = $loader->getPaths();
     for ($i = 3; $i <= 5; $i++) {
         $prefix = 'prefix' . $i . '\\';
         $this->assertArrayHasKey($prefix, $paths);
         $this->assertEquals($paths[$prefix], array('path' . $i . '/'));
     }
     $loader->clearPaths('prefix3');
     $loader->clearPaths('prefix4');
     $loader->clearPaths('prefix5');
 }