file-fetcher
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PHPUnit\Util\Annotation\DocBlock Class Reference

Detailed Description

This is an abstraction around a PHPUnit-specific docBlock, allowing us to ask meaningful questions about a specific reflection symbol.

Public Member Functions

 requirements ()
 
 expectedException ()
 
 getProvidedData ()
 
 getInlineAnnotations ()
 
 symbolAnnotations ()
 
 isHookToBeExecutedBeforeClass ()
 
 isHookToBeExecutedAfterClass ()
 
 isToBeExecutedBeforeTest ()
 
 isToBeExecutedAfterTest ()
 

Static Public Member Functions

static ofClass (\ReflectionClass $class)
 
static ofMethod (\ReflectionMethod $method, string $classNameInHierarchy)
 

Public Attributes

const REGEX_DATA_PROVIDER = '/@dataProvider\s+([a-zA-Z0-9._:-\\\\x7f-\xff]+)/'
 

Member Function Documentation

◆ expectedException()

PHPUnit\Util\Annotation\DocBlock::expectedException ( )
Returns
array|bool

@psalm-return false|array{ class: class-string, code: int|string|null, message: string, message_regex: string }

@psalm-var class-string $class

◆ getInlineAnnotations()

PHPUnit\Util\Annotation\DocBlock::getInlineAnnotations ( )

@psalm-return array<string, array{line: int, value: string}>

◆ getProvidedData()

PHPUnit\Util\Annotation\DocBlock::getProvidedData ( )

Returns the provided data for a method.

Exceptions
Exception

@noinspection SuspiciousBinaryOperationInspection

◆ isHookToBeExecutedAfterClass()

PHPUnit\Util\Annotation\DocBlock::isHookToBeExecutedAfterClass ( )

◆ isHookToBeExecutedBeforeClass()

PHPUnit\Util\Annotation\DocBlock::isHookToBeExecutedBeforeClass ( )

◆ isToBeExecutedAfterTest()

PHPUnit\Util\Annotation\DocBlock::isToBeExecutedAfterTest ( )

◆ isToBeExecutedBeforeTest()

PHPUnit\Util\Annotation\DocBlock::isToBeExecutedBeforeTest ( )

◆ ofClass()

static PHPUnit\Util\Annotation\DocBlock::ofClass ( \ReflectionClass  $class)
static

◆ ofMethod()

static PHPUnit\Util\Annotation\DocBlock::ofMethod ( \ReflectionMethod  $method,
string  $classNameInHierarchy 
)
static

@psalm-param class-string $classNameInHierarchy

◆ requirements()

PHPUnit\Util\Annotation\DocBlock::requirements ( )

@psalm-return array{ __OFFSET: array<string, int>&array{__FILE: string}, setting?: array<string, string>, extension_versions?: array<string, array{version: string, operator: string}> }&array< string, string|array{version: string, operator: string}|array{constraint: string}|array<int|string, string>

Exceptions
Warningif the requirements version constraint is not well-formed

◆ symbolAnnotations()

PHPUnit\Util\Annotation\DocBlock::symbolAnnotations ( )

Member Data Documentation

◆ REGEX_DATA_PROVIDER

const PHPUnit\Util\Annotation\DocBlock::REGEX_DATA_PROVIDER = '/@dataProvider\s+([a-zA-Z0-9._:-\\\\x7f-\xff]+)/'
Todo:
This constant should be private (it's public because of TestTest::testGetProvidedDataRegEx)

The documentation for this class was generated from the following file: