/** * Tests to ensure that the Query Mocker is used to execute a query. */ public function testExecuteMocker() { $mocker = new QueryMocker(); $mocker->setResult(true); QueryType::setMocker($mocker); $this->assertInstanceOf('\\Queryer\\Mock\\QueryMockerResult', $this->queryType->execute()); }
/** * Sets a mocker that will be able to watch what's going on, without letting anything actually hit the database. * * @param QueryMockerInterface $mock * @see \Queryer\Mock\QueryMocker */ public static function setMocker(QueryMockerInterface $mock) { QueryType::setMocker($mock); }