\FeatureContext

Context class for the phpDocumentor Features.

Summary

Methods
Properties
Constants
cleanTestFolders()
beforeScenario()
iAmInThePhpdocumentorRootDirectory()
iShouldGetALogEntry()
iShouldNotGetALogEntry()
iShouldGetALogEntryContaining()
iShouldNotGetALogEntryContaining()
iShouldGetAnException()
iShouldGetAnExceptionContaining()
aFileNamedWith()
iRunPhpdoc()
iRunPhpdocumentorAgainstNoFilesOrDirectories()
iRunPhpDocumentorAgainstTheFile()
iRunPhpDocumentorWith()
iRunPhpDocumentorAgainstTheFileUsingOption()
iRunPhpDocumentorAgainstTheDirectory()
iRunPhpdocumentorWithTheTemplate()
iShouldGet()
theExitCodeShouldBeZero()
theExitCodeShouldBeNonZero()
thereShouldBeNoOutput()
theConfigurationFileHasATransformationWithTheWriterHavingAsArtifact()
iHaveRemovedAllFilesWithTheExtension()
thereShouldBeNoFilesWithTheExtension()
theSectionOfTheConfigurationHas()
theApplicationMustHaveRunSuccessfully()
theApplicationReturnsAnErrorContaining()
aSourceFileContainingValidationErrors()
iShouldGetAFileContainingCheckstyleErrorDefinitions()
aSourceFileContainingValidationWarnings()
iShouldGetAFileContainingCheckstyleWarningDefinitions()
aSourceFileContainingNoErrors()
iShouldGetAFileContainingNoDefinitions()
iExpectTheFile()
theParentClassShouldLinkTo()
theAstHasAnExpressionWithValuePyString()
theAstHasAnExpressionWithValue()
getOutput()
getReturnCode()
theAstHasAAtExpression()
theAstHasNoExpression()
iDownloadTo()
iExecute()
displayLastCommandOutput()
theOutputShouldContain()
fileShouldExist()
aDirectory()
theProjectHasTheTitle()
No public properties found
No constants found
getCustomConfigurationAsXml()
getTempXmlConfigurationPath()
getAst()
$process
$binaryPath
N/A
getTmpFolder()
clearDirectory()
No private properties found
N/A

Properties

$process

$process : \Symfony\Component\Process\Process

Type

\Symfony\Component\Process\Process — the process used to execute phpDocumentor

$binaryPath

$binaryPath : string

Type

string — path to the phpdoc binary file, including phpdoc

Methods

cleanTestFolders()

cleanTestFolders() : void

Cleans test folders in the temporary directory.

beforeScenario()

beforeScenario() 

iAmInThePhpdocumentorRootDirectory()

iAmInThePhpdocumentorRootDirectory() : void

Changes the current working directory to that of phpDocumentor's root.

iShouldGetALogEntry()

iShouldGetALogEntry(string  $string) : void

Verifies whether one of the log entries is the same as the given.

Please note that this method exactly checks the given except for leading and trailing spaces and control characters; those are stripped first.

Parameters

string $string

Throws

\Exception

if the condition is not fulfilled

iShouldNotGetALogEntry()

iShouldNotGetALogEntry(string  $string) : void

Verifies whether a specific log entry was not thrown.

Parameters

string $string

Throws

\Exception

if the condition is not fulfilled

iShouldGetALogEntryContaining()

iShouldGetALogEntryContaining(string  $string) : void

Verifies whether a log entry contains the given substring.

Parameters

string $string

Throws

\Exception

if the condition is not fulfilled

iShouldNotGetALogEntryContaining()

iShouldNotGetALogEntryContaining(string  $string) : void

Verifies whether none of the log entries contain the given substring.

Parameters

string $string

Throws

\Exception

if the condition is not fulfilled

iShouldGetAnException()

iShouldGetAnException(string  $exception_text) : void

Verifies whether an exception is thrown during excecution.

Parameters

string $exception_text

Throws

\Exception

if the condition is not fulfilled

iShouldGetAnExceptionContaining()

iShouldGetAnExceptionContaining(string  $exception_text) : void

Verifies whether an exception is thrown during execution containing a substring.

Parameters

string $exception_text

Throws

\Exception

if the condition is not fulfilled

aFileNamedWith()

aFileNamedWith(  $arg1, \Behat\Gherkin\Node\PyStringNode  $string) 

Parameters

$arg1
\Behat\Gherkin\Node\PyStringNode $string

iRunPhpdoc()

iRunPhpdoc(string  $argumentsString = '') 

Parameters

string $argumentsString

iRunPhpdocumentorAgainstNoFilesOrDirectories()

iRunPhpdocumentorAgainstNoFilesOrDirectories() : void

Execute a run of phpDocumentor without any files or folders.

The configuration is explicitly disabled to prevent tainting via the configuration.

iRunPhpDocumentorAgainstTheFile()

iRunPhpDocumentorAgainstTheFile(string  $file_path) : void

Runs phpDocumentor with only the file that is provided in this command.

The configuration is explicitly disabled to prevent tainting via the configuration.

Parameters

string $file_path

iRunPhpDocumentorWith()

iRunPhpDocumentorWith(\Behat\Gherkin\Node\PyStringNode  $code,   $extraParameters = '') : void

Parses the given PHP code with phpDocumentor.

Parameters

\Behat\Gherkin\Node\PyStringNode $code
$extraParameters

iRunPhpDocumentorAgainstTheFileUsingOption()

iRunPhpDocumentorAgainstTheFileUsingOption(string  $file_path, string  $options) : void

Executes phpDocumentor and provides additional options.

Parameters

string $file_path
string $options

iRunPhpDocumentorAgainstTheDirectory()

iRunPhpDocumentorAgainstTheDirectory(string  $folder_path) : void

Executes phpDocumentor against the contents of a given folder.

Parameters

string $folder_path

iRunPhpdocumentorWithTheTemplate()

iRunPhpdocumentorWithTheTemplate(  $arg1) 

Parameters

$arg1

iShouldGet()

iShouldGet(\Behat\Gherkin\Node\PyStringNode  $string) : void

Verifies whether the output of an iRun When is equal to the given.

Parameters

\Behat\Gherkin\Node\PyStringNode $string

Throws

\Exception

if the condition is not fulfilled

theExitCodeShouldBeZero()

theExitCodeShouldBeZero() : void

Verifies whether the return code was 0 and thus execution was a success.

Throws

\Exception

if the condition is not fulfilled

theExitCodeShouldBeNonZero()

theExitCodeShouldBeNonZero() : void

Verifies whether the return code was not null and it was not a success.

Throws

\Exception

if the condition is not fulfilled

thereShouldBeNoOutput()

thereShouldBeNoOutput() : void

Verifies whether nothing was written to STDOUT.

Throws

\Exception

if the condition is not fulfilled

theConfigurationFileHasATransformationWithTheWriterHavingAsArtifact()

theConfigurationFileHasATransformationWithTheWriterHavingAsArtifact(  $arg1,   $arg2) 

Parameters

$arg1
$arg2

iHaveRemovedAllFilesWithTheExtension()

iHaveRemovedAllFilesWithTheExtension(  $arg1) 

Parameters

$arg1

thereShouldBeNoFilesWithTheExtension()

thereShouldBeNoFilesWithTheExtension(  $arg1) 

Parameters

$arg1

theSectionOfTheConfigurationHas()

theSectionOfTheConfigurationHas(  $arg1, \Behat\Gherkin\Node\PyStringNode  $string) 

Parameters

$arg1
\Behat\Gherkin\Node\PyStringNode $string

theApplicationMustHaveRunSuccessfully()

theApplicationMustHaveRunSuccessfully() 

theApplicationReturnsAnErrorContaining()

theApplicationReturnsAnErrorContaining(  $arg1) 

Parameters

$arg1

aSourceFileContainingValidationErrors()

aSourceFileContainingValidationErrors() 

iShouldGetAFileContainingCheckstyleErrorDefinitions()

iShouldGetAFileContainingCheckstyleErrorDefinitions(  $arg1) 

Parameters

$arg1

aSourceFileContainingValidationWarnings()

aSourceFileContainingValidationWarnings() 

iShouldGetAFileContainingCheckstyleWarningDefinitions()

iShouldGetAFileContainingCheckstyleWarningDefinitions(  $arg1) 

Parameters

$arg1

aSourceFileContainingNoErrors()

aSourceFileContainingNoErrors() 

iShouldGetAFileContainingNoDefinitions()

iShouldGetAFileContainingNoDefinitions(  $arg1) 

Parameters

$arg1

iExpectTheFile()

iExpectTheFile(  $arg1) 

Parameters

$arg1

theParentClassShouldLinkTo()

theParentClassShouldLinkTo(  $arg1) 

Parameters

$arg1

theAstHasAnExpressionWithValuePyString()

theAstHasAnExpressionWithValuePyString(  $expression, \Behat\Gherkin\Node\PyStringNode  $value) 

Parameters

$expression
\Behat\Gherkin\Node\PyStringNode $value

theAstHasAnExpressionWithValue()

theAstHasAnExpressionWithValue(  $expression,   $value) 

Parameters

$expression
$value

getOutput()

getOutput() : string

Returns

string

getReturnCode()

getReturnCode() : integer

Returns

integer

theAstHasAAtExpression()

theAstHasAAtExpression(  $arg1,   $arg2) 

Parameters

$arg1
$arg2

theAstHasNoExpression()

theAstHasNoExpression(  $arg1,   $arg2) 

Parameters

$arg1
$arg2

iDownloadTo()

iDownloadTo(  $arg1,   $arg2) 

Parameters

$arg1
$arg2

iExecute()

iExecute(  $arg1) 

Parameters

$arg1

displayLastCommandOutput()

displayLastCommandOutput() 

Prints last command output string.

theOutputShouldContain()

theOutputShouldContain(\Behat\Gherkin\Node\PyStringNode  $string) 

Parameters

\Behat\Gherkin\Node\PyStringNode $string

fileShouldExist()

fileShouldExist(  $arg1) 

Parameters

$arg1

aDirectory()

aDirectory(  $arg1) 

Parameters

$arg1

theProjectHasTheTitle()

theProjectHasTheTitle(  $arg1) 

Parameters

$arg1

getCustomConfigurationAsXml()

getCustomConfigurationAsXml() : \DOMDocument

Returns

\DOMDocument

getTempXmlConfigurationPath()

getTempXmlConfigurationPath() 

getTmpFolder()

getTmpFolder() 

clearDirectory()

clearDirectory(string  $path) : void

Recursively empties a directory inclusing subdirectories.

Parameters

string $path