You are here

public function PagedRouteCollectionTest::providerIterator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/Tests/Routing/PagedRouteCollectionTest.php \Symfony\Cmf\Component\Routing\PagedRouteCollectionTest::providerIterator()

Provides test data for testIterator().

File

vendor/symfony-cmf/routing/Tests/Routing/PagedRouteCollectionTest.php, line 72

Class

PagedRouteCollectionTest
Tests the page route collection.

Namespace

Symfony\Cmf\Component\Routing

Code

public function providerIterator() {
  $data = array();

  // Non total routes.
  $data[] = array(
    0,
    20,
    array(
      array(
        0,
        20,
      ),
    ),
  );

  // Less total routes than loaded in parallel.
  $data[] = array(
    10,
    20,
    array(
      array(
        0,
        20,
      ),
    ),
  );

  // Exact the same amount of routes then loaded in parallel.
  $data[] = array(
    20,
    20,
    array(
      array(
        0,
        20,
      ),
      array(
        20,
        20,
      ),
    ),
  );

  // Less than twice the amount.
  $data[] = array(
    39,
    20,
    array(
      array(
        0,
        20,
      ),
      array(
        20,
        20,
      ),
    ),
  );

  // More total routes than loaded in parallel.
  $data[] = array(
    40,
    20,
    array(
      array(
        0,
        20,
      ),
      array(
        20,
        20,
      ),
      array(
        40,
        20,
      ),
    ),
  );
  $data[] = array(
    41,
    20,
    array(
      array(
        0,
        20,
      ),
      array(
        20,
        20,
      ),
      array(
        40,
        20,
      ),
    ),
  );

  // why not.
  $data[] = array(
    42,
    23,
    array(
      array(
        0,
        23,
      ),
      array(
        23,
        23,
      ),
    ),
  );
  return $data;
}