getEBNF() public méthode

Returns a string representation of the EBNF, based on the configured rules and the default settings, like the commit message length.
public getEBNF ( ) : string
Résultat string
    public function testGeneratedCustomEBNF()
    {
        $parser = new pchCommitMessageCheck(array('Done' => pchCommitMessageCheck::REQUIRED, 'Tested' => pchCommitMessageCheck::OPTIONAL, 'Fixed' => pchCommitMessageCheck::PROHIBITED));
        $expectation = <<<'EOEBNF'
Message       ::= Statement+ | Statement* Comment+
Statement     ::= Done | Tested | Fixed
Comment       ::= '# ' TextLine | '#\n'

Done          ::= '- Done'         BugNr  ': ' TextLine Text?
Tested        ::= '- Tested'       BugNr? ': ' TextLine Text?
Fixed         ::= '- Fixed'               ': ' TextLine Text?

Text          ::= '  ' TextLine Text?
BugNr         ::= ' #' [1-9]+[0-9]*
TextLine      ::= [\x20-\x7E]+ "\n"

EOEBNF;
        $this->assertEquals($expectation, $parser->getEBNF());
    }