Repo2\QueryReactor\Query\GenericQuery::reject PHP Method

reject() public method

public reject ( Exception $err )
$err Exception
    public function reject(\Exception $err)
    {
        if ($this->onReject) {
            call_user_func($this->onReject, $err);
        }
    }

Usage Example

Example #1
0
 public function testReject()
 {
     $onReject = $this->getMock('\\Repo2\\QueryReactor\\Tests\\Stub');
     $onReject->expects($this->once())->method('__invoke');
     $query = new GenericQuery(Fixtures::getSelect(), null, $onReject);
     $this->assertNull($query->reject(new \Exception()));
 }