for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\DoctrineMongoDBAdminBundle\Tests\Filter;
use Sonata\DoctrineMongoDBAdminBundle\Tests\Helpers\PHPUnit_Framework_TestCase;
abstract class FilterWithQueryBuilderTest extends PHPUnit_Framework_TestCase
{
private $queryBuilder = null;
private $expr = null;
public function setUp()
$this->queryBuilder = $this->createMock('Doctrine\ODM\MongoDB\Query\Builder');
$this->queryBuilder
->expects($this->any())
->method('field')
->will($this->returnSelf())
;
$this->expr = $this->createMock('Doctrine\ODM\MongoDB\Query\Expr');
$this->expr
->method('expr')
->will($this->returnValue($this->expr))
}
protected function getQueryBuilder()
return $this->queryBuilder;