Commit d3cb54ec authored by webchick's avatar webchick
Browse files

Issue #2235111 by tstoeckler: EntityQueryTest is fragile.

parent 64b838ad
......@@ -235,6 +235,7 @@ function testEntityQuery() {
// word but allows us to test revisions and string operations.
$ids = $this->factory->get('entity_test_mulrev')
->condition("$greetings.value", 'merhaba')
$entities = entity_load_multiple('entity_test_mulrev', $ids);
foreach ($entities as $entity) {
......@@ -267,12 +268,14 @@ function testEntityQuery() {
$this->assertIdentical($results, $assert);
$results = $this->factory->get('entity_test_mulrev')
->condition("$greetings.value", 'siema', 'STARTS_WITH')
// Now we only get the ones that originally were siema, entity id 8 and
// above.
$this->assertIdentical($results, array_slice($assert, 4, 8, TRUE));
$results = $this->factory->get('entity_test_mulrev')
->condition("$greetings.value", 'a', 'ENDS_WITH')
// It is very important that we do not get the ones which only have
// xsiemax despite originally they were merhaba, ie. ended with a.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment