- // causes 'Non-static method should not be called statically, assuming $this from incompatible context'
- // failure on travis
- // $oDB = \DB::connect('', false); // returns a DB_Error instance
-
- $oDB = new \DB_Error;
- $oStatus = new Status($oDB);
- $this->assertEquals('No database', $oStatus->status());
-
- $oDB = null;
- $oStatus = new Status($oDB);
- $this->assertEquals('No database', $oStatus->status());
- }
-
-
- public function testModuleFail()
- {
- $this->expectException(\Exception::class);
- $this->expectExceptionMessage('Module call failed');
- $this->expectExceptionCode(702);
-
- // stub has getOne method but doesn't return anything
- $oDbStub = $this->getMockBuilder(\DB::class)
- ->setMethods(array('getOne'))