Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix tests to be more stable

  • Loading branch information...
commit 166c05dfaab2ece2da49edf09d17ba911f1018d6 1 parent 9e8a950
@beberlei beberlei authored
Showing with 18 additions and 18 deletions.
  1. +18 −18 tests/Doctrine/Tests/ORM/Functional/QueryTest.php
View
36 tests/Doctrine/Tests/ORM/Functional/QueryTest.php
@@ -462,30 +462,30 @@ public function testgetOneOrNullResultNoRows()
*/
public function testParameterOrder()
{
- $user = new CmsUser;
- $user->name = 'Benjamin';
- $user->username = 'beberlei';
- $user->status = 'developer';
- $this->_em->persist($user);
-
- $user = new CmsUser;
- $user->name = 'Roman';
- $user->username = 'romanb';
- $user->status = 'developer';
- $this->_em->persist($user);
-
- $user = new CmsUser;
- $user->name = 'Jonathan';
- $user->username = 'jwage';
- $user->status = 'developer';
- $this->_em->persist($user);
+ $user1 = new CmsUser;
+ $user1->name = 'Benjamin';
+ $user1->username = 'beberlei';
+ $user1->status = 'developer';
+ $this->_em->persist($user1);
+
+ $user2 = new CmsUser;
+ $user2->name = 'Roman';
+ $user2->username = 'romanb';
+ $user2->status = 'developer';
+ $this->_em->persist($user2);
+
+ $user3 = new CmsUser;
+ $user3->name = 'Jonathan';
+ $user3->username = 'jwage';
+ $user3->status = 'developer';
+ $this->_em->persist($user3);
$this->_em->flush();
$this->_em->clear();
$query = $this->_em->createQuery("SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.status = :a AND u.id IN (:b)");
$query->setParameters(array(
- 'b' => array(1,2,3),
+ 'b' => array($user1->id, $user2->id, $user3->id),
'a' => 'developer',
));
$result = $query->getResult();
Please sign in to comment.
Something went wrong with that request. Please try again.