getDataFromTestWithAnnotation() 공개 정적인 메소드

public static getDataFromTestWithAnnotation ( string $docComment ) : array
$docComment string full docComment string
리턴 array when @testWith annotation is defined null when @testWith annotation is omitted
예제 #1
0
 /**
  * @covers PHPUnit_Util_Test::getDataFromTestWithAnnotation
  */
 public function testTestWithThrowsProperExceptionIfDatasetCannotBeParsed()
 {
     $this->setExpectedExceptionRegExp('PHPUnit_Framework_Exception', '/^The dataset for the @testWith annotation cannot be parsed.$/');
     PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
                                                        * @testWith [s]
                                                        */');
 }
예제 #2
0
파일: TestTest.php 프로젝트: thekabal/tki
 public function testTestWithThrowsProperExceptionIfMultiLineDatasetCannotBeParsed()
 {
     $this->expectException(PHPUnit_Framework_Exception::class);
     $this->expectExceptionMessageRegExp('/^The dataset for the @testWith annotation cannot be parsed:/');
     PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
                                                        * @testWith ["valid"]
                                                        *           [invalid]
                                                        */');
 }