expectException(\Exception::class); try{ $oiTopConfigValidator->Validate($sConf); }catch (\Exception $e) { $this->assertStringStartsWith('Invalid configuration:', $e->getMessage()); throw $e; } } public function InvalidDataProvider() { return array( 'invalid PHP' => array( 'sConf' => ' array( 'sConf' => ' array( 'sConf' => ' array( 'sConf' => ' array( 'sConf' => ' array( 'sConf' => '' ), ); } /** * @dataProvider ValidDataProvider * @doesNotPerformAssertions * * @param $sConf * * @throws \Exception */ public function testValid($sConf) { $oiTopConfigValidator = new iTopConfigAstValidator(); $oiTopConfigValidator->Validate($sConf); } public function ValidDataProvider() { return array( 'simple code' => array( 'sConf' => '' ), 'class constant' => array( 'sConf' => '