Skip to content

Commit

Permalink
Failing test for doctrine#6699
Browse files Browse the repository at this point in the history
  • Loading branch information
Majkl578 committed Sep 16, 2017
1 parent 0c4f9a8 commit bab63ce
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/GH6699Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace Doctrine\Tests\ORM\Functional\Ticket;

use Doctrine\Tests\Models\CMS\CmsUser;
use Doctrine\Tests\OrmFunctionalTestCase;

/**
* @group #6699
*/
class GH6699Test extends OrmFunctionalTestCase
{
protected function setUp()
{
$this->useModelSet('cms');
parent::setUp();
}

public function testMixedParametersWithZeroNumber()
{
$qb = $this->_em->createQueryBuilder()
->select('u')
->from(CmsUser::class, 'u')
->andWhere('u.email = :email')
->andWhere('u.id = ?0');
$query = $qb->getQuery();

$query->setParameter('email', 'bar');
$query->setParameter(0, 0);

$query->execute();

$this->assertSame(2, $query->getParameters()->count());
$this->assertSame(0, $query->getParameter(0)->getValue());
$this->assertSame('bar', $query->getParameter('email')->getValue());
}
}

0 comments on commit bab63ce

Please sign in to comment.