1 entity_query.test EntityFieldQueryTestCase::testEntityFieldQueryDisablePager()

Tests the disabling the pager in EntityFieldQuery.

File

core/modules/entity/tests/entity_query.test, line 1328
Unit test file for the entity API.

Class

EntityFieldQueryTestCase
Tests EntityFieldQuery.

Code

function testEntityFieldQueryDisablePager() {
  // Test enabling a pager and then disabling it.
  $query = new EntityFieldQuery();
  $query
  ->entityCondition('entity_type', 'test_entity_bundle_key')
    ->propertyOrderBy('ftid', 'ASC')
    ->pager(1)
    ->pager(0);
  $this->assertEntityFieldQuery($query, array(
    array('test_entity_bundle_key', 1),
    array('test_entity_bundle_key', 2),
    array('test_entity_bundle_key', 3),
    array('test_entity_bundle_key', 4),
    array('test_entity_bundle_key', 5),
    array('test_entity_bundle_key', 6),
  ), t('Test disabling pager in propertyQuery.'), TRUE);
}