1<?php 2 3class Issue498Test extends PHPUnit_Framework_TestCase 4{ 5 /** 6 * @test 7 * @dataProvider shouldBeTrueDataProvider 8 * @group falseOnly 9 */ 10 public function shouldBeTrue($testData) 11 { 12 $this->assertTrue(true); 13 } 14 15 /** 16 * @test 17 * @dataProvider shouldBeFalseDataProvider 18 * @group trueOnly 19 */ 20 public function shouldBeFalse($testData) 21 { 22 $this->assertFalse(false); 23 } 24 25 public function shouldBeTrueDataProvider() 26 { 27 28 //throw new Exception("Can't create the data"); 29 return [ 30 [true], 31 [false] 32 ]; 33 } 34 35 public function shouldBeFalseDataProvider() 36 { 37 throw new Exception("Can't create the data"); 38 39 return [ 40 [true], 41 [false] 42 ]; 43 } 44} 45