Example #1
0
 public function testsStoresErrorInformation()
 {
     $query = new Query($this->db);
     $code = 13;
     $msg = 'Oops, yo!';
     $this->assertFalse($query->hasError());
     $query->setError($code, $msg);
     $this->assertTrue($query->hasError());
     $this->assertEquals($code, $query->getErrorCode());
     $this->assertEquals($msg, $query->getErrorMessage());
 }