FileDeclaration
Declares contents on server response expectations on a static file.
should only be used from within TYPO3 Core
Table of Contents
Constants
- FLAG_BUILD_HTML = 1
- FLAG_BUILD_HTML_DOCUMENT = 64
- FLAG_BUILD_PHP = 2
- FLAG_BUILD_SVG = 4
- FLAG_BUILD_SVG_DOCUMENT = 128
Properties
- $buildFlags : int
- $expectedContent : string|null
- $expectedContentType : string|null
- $fail : bool
- $fileLocation : FileLocation
- $fileName : string
- $handler : Closure
- $unexpectedContent : string|null
- $unexpectedContentType : string|null
Methods
- __construct() : mixed
- buildContent() : string
- getExpectedContent() : string|null
- getExpectedContentType() : string|null
- getFileLocation() : FileLocation
- getFileName() : string
- getMismatches() : array<string|int, StatusMessage>
- getUnexpectedContent() : string|null
- getUnexpectedContentType() : string|null
- getUrl() : string
- matches() : bool
- shallFail() : bool
- withBuildFlags() : self
- withExpectedContent() : self
- withExpectedContentType() : self
- withHandler() : self
- withUnexpectedContent() : self
- withUnexpectedContentType() : self
Constants
FLAG_BUILD_HTML
public
mixed
FLAG_BUILD_HTML
= 1
FLAG_BUILD_HTML_DOCUMENT
public
mixed
FLAG_BUILD_HTML_DOCUMENT
= 64
FLAG_BUILD_PHP
public
mixed
FLAG_BUILD_PHP
= 2
FLAG_BUILD_SVG
public
mixed
FLAG_BUILD_SVG
= 4
FLAG_BUILD_SVG_DOCUMENT
public
mixed
FLAG_BUILD_SVG_DOCUMENT
= 128
Properties
$buildFlags
protected
int
$buildFlags
= self::FLAG_BUILD_HTML | self::FLAG_BUILD_HTML_DOCUMENT
$expectedContent
protected
string|null
$expectedContent
$expectedContentType
protected
string|null
$expectedContentType
$fail
protected
bool
$fail
$fileLocation
protected
FileLocation
$fileLocation
$fileName
protected
string
$fileName
$handler
protected
Closure
$handler
$unexpectedContent
protected
string|null
$unexpectedContent
$unexpectedContentType
protected
string|null
$unexpectedContentType
Methods
__construct()
public
__construct(FileLocation $fileLocation, string $fileName[, bool $fail = false ]) : mixed
Parameters
- $fileLocation : FileLocation
- $fileName : string
- $fail : bool = false
buildContent()
public
buildContent() : string
Return values
stringgetExpectedContent()
public
getExpectedContent() : string|null
Return values
string|nullgetExpectedContentType()
public
getExpectedContentType() : string|null
Return values
string|nullgetFileLocation()
public
getFileLocation() : FileLocation
Return values
FileLocationgetFileName()
public
getFileName() : string
Return values
stringgetMismatches()
public
getMismatches(ResponseInterface $response) : array<string|int, StatusMessage>
Parameters
- $response : ResponseInterface
Return values
array<string|int, StatusMessage>getUnexpectedContent()
public
getUnexpectedContent() : string|null
Return values
string|nullgetUnexpectedContentType()
public
getUnexpectedContentType() : string|null
Return values
string|nullgetUrl()
public
getUrl() : string
Return values
stringmatches()
public
matches(ResponseInterface $response) : bool
Parameters
- $response : ResponseInterface
Return values
boolshallFail()
public
shallFail() : bool
Return values
boolwithBuildFlags()
public
withBuildFlags(int $buildFlags) : self
Parameters
- $buildFlags : int
Return values
selfwithExpectedContent()
public
withExpectedContent(string $content) : self
Parameters
- $content : string
Return values
selfwithExpectedContentType()
public
withExpectedContentType(string $contentType) : self
Parameters
- $contentType : string
Return values
selfwithHandler()
public
withHandler(Closure $handler) : self
Parameters
- $handler : Closure
Return values
selfwithUnexpectedContent()
public
withUnexpectedContent(string $content) : self
Parameters
- $content : string
Return values
selfwithUnexpectedContentType()
public
withUnexpectedContentType(string $contentType) : self
Parameters
- $contentType : string