Validate("expectException(\Exception::class); try{ $oiTopConfigValidator->Validate(""); }catch (\Exception $e) { $this->assertStringStartsWith('Error in configuration: syntax error, unexpected \'zdadz\' (T_STRING)', $e->getMessage()); throw $e; } } }