summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-04-28 23:11:57 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2012-04-28 23:11:57 -0700
commita7d43f3460a97ad3c9b1cb23f7d374a4994837a3 (patch)
tree516f8047365df281c88843d93895291cb363710a /modules/simpletest/tests
parent060eb35f0ae4cde353a0048a6da0818b2fd5fb35 (diff)
downloadbrdo-a7d43f3460a97ad3c9b1cb23f7d374a4994837a3.tar.gz
brdo-a7d43f3460a97ad3c9b1cb23f7d374a4994837a3.tar.bz2
Issue #1490150 by xjm, duellj, tim.plunkett: Fixed EntityFieldQuery::pager(0) generates PHP error 'divide by zero'.
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/entity_query.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/simpletest/tests/entity_query.test b/modules/simpletest/tests/entity_query.test
index d5e5524f2..ddfd35433 100644
--- a/modules/simpletest/tests/entity_query.test
+++ b/modules/simpletest/tests/entity_query.test
@@ -1409,6 +1409,27 @@ class EntityFieldQueryTestCase extends DrupalWebTestCase {
}
/**
+ * Tests disabling the pager in EntityFieldQuery.
+ */
+ 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),
+ ), 'All test entities are listed when the pager is enabled and then disabled.', TRUE);
+ }
+
+ /**
* Tests the TableSort integration of EntityFieldQuery.
*/
function testEntityFieldQueryTableSort() {