FeatureContext

Implements \Behat\Behat\Context\Context

Context class for the phpDocumentor Features.

package

Default

Methods

aDirectory

aDirectory( $arg1) 
Given

/^a directory "([^"]*)"$/

Arguments

$arg1

aFileNamedWith

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

/^a file named "([^"]*)" with:$/

Arguments

$arg1

$string

\Behat\Gherkin\Node\PyStringNode

aSourceFileContainingNoErrors

aSourceFileContainingNoErrors() 
Given

/^a source file containing no errors$/

aSourceFileContainingValidationErrors

aSourceFileContainingValidationErrors() 
Given

/^a source file containing validation errors$/

aSourceFileContainingValidationWarnings

aSourceFileContainingValidationWarnings() 
Given

/^a source file containing validation warnings$/

beforeScenario

beforeScenario() 
beforeScenario

Cleans test folders in the temporary directory.

cleanTestFolders() : void
static
BeforeSuite
AfterSuite

Recursively empties a directory inclusing subdirectories.

clearDirectory(string $path) : void
static
see https://github.com/Behat/Behat/blob/master/features/bootstrap/FeatureContext.php#L291

for the original method.

Arguments

$path

string

Prints last command output string.

displayLastCommandOutput() 
Then

display last command output

fileShouldExist

fileShouldExist( $arg1) 
Given

/^file "([^"]*)" should exist$/

Arguments

$arg1

getAst

getAst() : \phpDocumentor\Descriptor\ProjectDescriptor|null

getCustomConfigurationAsXml

getCustomConfigurationAsXml() : \DOMDocument

Response

\DOMDocument

getOutput

getOutput() : string

Response

string

getReturnCode

getReturnCode() : integer

Response

integer

getTempXmlConfigurationPath

getTempXmlConfigurationPath() 

getTmpFolder

getTmpFolder() 
static

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

iAmInThePhpdocumentorRootDirectory() : void
Given

/^I am in the phpDocumentor root directory$/

iDownloadTo

iDownloadTo( $arg1,  $arg2) 
When

/^I download "([^"])" to "([^"])"$/

Arguments

$arg1

$arg2

iExecute

iExecute( $arg1) 
When

/^I execute "([^"]*)"$/

Arguments

$arg1

iExpectTheFile

iExpectTheFile( $arg1) 
Then

/^I expect the file "([^"]*)"$/

Arguments

$arg1

iHaveRemovedAllFilesWithTheExtension

iHaveRemovedAllFilesWithTheExtension( $arg1) 
Given

/^I have removed all files with the "([^"]*)" extension$/

Arguments

$arg1

iRunPhpdoc

iRunPhpdoc(string $argumentsString = '') 
When

/^I run "phpdoc(?: ((?:\"|[^"])*))?"$/

Arguments

$argumentsString

string

Execute a run of phpDocumentor without any files or folders.

iRunPhpdocumentorAgainstNoFilesOrDirectories() : void

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

When

/^I run phpDocumentor against no files or directories$/

Executes phpDocumentor against the contents of a given folder.

iRunPhpDocumentorAgainstTheDirectory(string $folder_path) : void
When

/^I run phpDocumentor against the directory "([^"]*)"$/

Arguments

$folder_path

string

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

iRunPhpDocumentorAgainstTheFile(string $file_path) : void

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

When

/^I run phpDocumentor against the file "([^"]*)"$/

Arguments

$file_path

string

Executes phpDocumentor and provides additional options.

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

/^I run phpDocumentor against the file "([^"])" using option "([^"])"$/

Arguments

$file_path

string

$options

string

Parses the given PHP code with phpDocumentor.

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

/^I run phpDocumentor with:$/

Arguments

$code

\Behat\Gherkin\Node\PyStringNode

$extraParameters

iRunPhpdocumentorWithTheTemplate

iRunPhpdocumentorWithTheTemplate( $arg1) 
When

/^I run phpDocumentor with the "([^"]*)" template$/

Arguments

$arg1

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

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

/^I should get:$/

Throws
\Exception

if the condition is not fulfilled

Arguments

$string

\Behat\Gherkin\Node\PyStringNode

iShouldGetAFileContainingCheckstyleErrorDefinitions

iShouldGetAFileContainingCheckstyleErrorDefinitions( $arg1) 
Then

/^I should get a file "([^"]*)" containing checkstyle error definitions$/

Arguments

$arg1

iShouldGetAFileContainingCheckstyleWarningDefinitions

iShouldGetAFileContainingCheckstyleWarningDefinitions( $arg1) 
Then

/^I should get a file "([^"]*)" containing checkstyle warning definitions$/

Arguments

$arg1

iShouldGetAFileContainingNoDefinitions

iShouldGetAFileContainingNoDefinitions( $arg1) 
Then

/^I should get a file "([^"]*)" containing no definitions$/

Arguments

$arg1

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

iShouldGetALogEntry(string $string) : void

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

Then

/^I should get a log entry "([^"]*)"$/

Throws
\Exception

if the condition is not fulfilled

Arguments

$string

string

Verifies whether a log entry contains the given substring.

iShouldGetALogEntryContaining(string $string) : void
Then

/^I should get a log entry containing "([^"]*)"$/

Throws
\Exception

if the condition is not fulfilled

Arguments

$string

string

Verifies whether an exception is thrown during excecution.

iShouldGetAnException(string $exception_text) : void
Then

/^I should get an exception "([^"]*)"$/

Throws
\Exception

if the condition is not fulfilled

Arguments

$exception_text

string

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

iShouldGetAnExceptionContaining(string $exception_text) : void
Then

/^I should get an exception containing "([^"]*)"$/

Throws
\Exception

if the condition is not fulfilled

Arguments

$exception_text

string

Verifies whether a specific log entry was not thrown.

iShouldNotGetALogEntry(string $string) : void
Then

/^I should not get a log entry "([^"]*)"$/

Throws
\Exception

if the condition is not fulfilled

Arguments

$string

string

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

iShouldNotGetALogEntryContaining(string $string) : void
Then

/^I should not get a log entry containing "([^"]*)"$/

Throws
\Exception

if the condition is not fulfilled

Arguments

$string

string

theApplicationMustHaveRunSuccessfully

theApplicationMustHaveRunSuccessfully() 
Then

/^the application must have run successfully$/

theApplicationReturnsAnErrorContaining

theApplicationReturnsAnErrorContaining( $arg1) 
Then

/^the application returns an error containing '([^']*)'$/

Arguments

$arg1

theAstHasAAtExpression

theAstHasAAtExpression( $arg1,  $arg2) 
Then

/^the AST has a[n]? "([^"])" at expression "([^"])"$/

Arguments

$arg1

$arg2

theAstHasAnExpressionWithValue

theAstHasAnExpressionWithValue( $expression,  $value) 
Then

/^the AST has an expression "([^"])" with value: "([^"])"$/

Arguments

$expression

$value

theAstHasAnExpressionWithValuePyString

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

/^the AST has an expression "([^"]*)" with value:$/

Arguments

$expression

$value

\Behat\Gherkin\Node\PyStringNode

theAstHasNoExpression

theAstHasNoExpression( $arg1,  $arg2) 
Then

/^the AST has no "([^"])" at expression "([^"])"$/

Arguments

$arg1

$arg2

theConfigurationFileHasATransformationWithTheWriterHavingAsArtifact

theConfigurationFileHasATransformationWithTheWriterHavingAsArtifact( $arg1,  $arg2) 
Given

/^the configuration file has a transformation with the "([^"])" writer having "([^"])" as artifact$/

Arguments

$arg1

$arg2

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

theExitCodeShouldBeNonZero() : void
Then

/^the exit code should be non-zero$/

Throws
\Exception

if the condition is not fulfilled

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

theExitCodeShouldBeZero() : void
Then

/^the exit code should be zero$/

Throws
\Exception

if the condition is not fulfilled

theOutputShouldContain

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

/^the output should contain:$/

Arguments

$string

\Behat\Gherkin\Node\PyStringNode

theParentClassShouldLinkTo

theParentClassShouldLinkTo( $arg1) 
Then

/^the parent class should link to "([^"]*)"$/

Arguments

$arg1

theProjectHasTheTitle

theProjectHasTheTitle( $arg1) 
Then

/^the project has the title "([^"]*)"$/

Arguments

$arg1

thereShouldBeNoFilesWithTheExtension

thereShouldBeNoFilesWithTheExtension( $arg1) 
Then

/^there should be no files with the "([^"]*)" extension$/

Arguments

$arg1

Verifies whether nothing was written to STDOUT.

thereShouldBeNoOutput() : void
Then

/^there should be no output$/

Throws
\Exception

if the condition is not fulfilled

theSectionOfTheConfigurationHas

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

/^the "([^"]*)" section of the configuration has$/

Arguments

$arg1

$string

\Behat\Gherkin\Node\PyStringNode

Properties

the process used to execute phpDocumentor

process : \Symfony\Component\Process\Process
var

the process used to execute phpDocumentor

Type(s)

\Symfony\Component\Process\Process

path to the phpdoc binary file, including phpdoc

binaryPath : string
var

path to the phpdoc binary file, including phpdoc

Type(s)

string