@@ -178,6 +178,10 @@ public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time
178178 */
179179 public function startTestSuite (PHPUnit_Framework_TestSuite $ suite )
180180 {
181+ if ($ suite instanceof \PHPUnit_Framework_TestSuite_DataProvider) {
182+ return ;
183+ }
184+
181185 $ suiteName = $ suite ->getName ();
182186 $ event = new TestSuiteStartedEvent ($ suiteName );
183187 $ this ->uuid = $ event ->getUuid ();
@@ -201,6 +205,10 @@ public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
201205 */
202206 public function endTestSuite (PHPUnit_Framework_TestSuite $ suite )
203207 {
208+ if ($ suite instanceof \PHPUnit_Framework_TestSuite_DataProvider) {
209+ return ;
210+ }
211+
204212 Allure::lifecycle ()->fire (new TestSuiteFinishedEvent ($ this ->uuid ));
205213 }
206214
@@ -212,14 +220,13 @@ public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
212220 public function startTest (PHPUnit_Framework_Test $ test )
213221 {
214222 if ($ test instanceof \PHPUnit_Framework_TestCase) {
215- $ suiteName = $ this ->suiteName ;
216223 $ testName = $ test ->getName ();
217224 $ methodName = $ this ->methodName = $ test ->getName (false );
218225
219226 $ event = new TestCaseStartedEvent ($ this ->uuid , $ testName );
220- if (class_exists ( $ suiteName , false ) && method_exists ($ suiteName , $ methodName )) {
227+ if (method_exists ($ test , $ methodName )) {
221228 $ annotationManager = new Annotation \AnnotationManager (
222- Annotation \AnnotationProvider::getMethodAnnotations ($ suiteName , $ methodName )
229+ Annotation \AnnotationProvider::getMethodAnnotations (get_class ( $ test ) , $ methodName )
223230 );
224231 $ annotationManager ->updateTestCaseEvent ($ event );
225232 }
0 commit comments