| 1 | <?php |
||
| 14 | abstract class FilterWithQueryBuilderTest extends \PHPUnit_Framework_TestCase |
||
| 15 | { |
||
| 16 | private $queryBuilder = null; |
||
| 17 | private $expr = null; |
||
| 18 | |||
| 19 | public function setUp() |
||
| 20 | { |
||
| 21 | $this->queryBuilder = $this->getMockBuilder('Doctrine\ODM\MongoDB\Query\Builder') |
||
| 22 | ->disableOriginalConstructor() |
||
| 23 | ->getMock(); |
||
| 24 | $this->queryBuilder |
||
| 25 | ->expects($this->any()) |
||
| 26 | ->method('field') |
||
| 27 | ->will($this->returnSelf()) |
||
| 28 | ; |
||
| 29 | $this->expr = $this->getMockBuilder('Doctrine\ODM\MongoDB\Query\Expr') |
||
| 30 | ->disableOriginalConstructor() |
||
| 31 | ->getMock(); |
||
| 32 | $this->expr |
||
| 33 | ->expects($this->any()) |
||
| 34 | ->method('field') |
||
| 35 | ->will($this->returnSelf()) |
||
| 36 | ; |
||
| 37 | $this->queryBuilder |
||
| 38 | ->expects($this->any()) |
||
| 39 | ->method('expr') |
||
| 40 | ->will($this->returnValue($this->expr)) |
||
| 41 | ; |
||
| 42 | } |
||
| 43 | |||
| 44 | protected function getQueryBuilder() |
||
| 48 | } |
||
| 49 |