Pinq\Tests\Integration\Providers\DSL\DSLProviderTest::queryCacheAdapterMock PHP Method

queryCacheAdapterMock() protected method

protected queryCacheAdapterMock ( Pinq\Providers\DSL\Compilation\IQueryTemplate $queryTemplateMock, Pinq\Providers\DSL\Compilation\ICompiledQuery $compiledQueryMock )
$queryTemplateMock Pinq\Providers\DSL\Compilation\IQueryTemplate
$compiledQueryMock Pinq\Providers\DSL\Compilation\ICompiledQuery
    protected function queryCacheAdapterMock(Compilation\IQueryTemplate $queryTemplateMock, Compilation\ICompiledQuery $compiledQueryMock)
    {
        $cacheMock = $this->getMockBuilder('Pinq\\Caching\\NullCache')->disableOriginalConstructor()->setMethods(['tryGet', 'save'])->getMock();
        $cacheMock->expects($this->any())->method('tryGet')->will($this->returnValue(null));
        $cacheMock->expects($this->exactly(2))->method('save')->with($this->isType('string'), $this->logicalOr($this->identicalTo($queryTemplateMock), $this->identicalTo($compiledQueryMock)))->will($this->returnValue(null));
        return $cacheMock;
    }