Class Kitab\Compiler\Target\DocTest\DocTest
class DocTest
{
public function addCodeBlockHandler(Kitab\Compiler\Target\DocTest\CodeBlockHandler\Definition $codeBlockHandler): self;
public function removeCodeBlockHandler(Kitab\Compiler\Target\DocTest\CodeBlockHandler\Definition $codeBlockHandler): self;
public function compile(Kitab\Compiler\IntermediateRepresentation\File $file);
protected function compileEntity(Kitab\Compiler\IntermediateRepresentation\Entity $entity): string;
public function assemble(array $symbols);
protected function getCodeBlocks(Kitab\Compiler\IntermediateRepresentation\Documentation $documentation): Generator;
protected function parseCodeBlocks(League\CommonMark\Node\NodeWalker $walker): Generator;
protected function compileToTestCases(string $testCaseName, array $codeBlock): Generator;
protected function getMarkdownParser();
protected function computeTestSuiteShortName(string $shortName, string $longName): string;
}
Constants
public const EXAMPLES_SECTION = 'Examples';
-
public const EXCEPTIONS_SECTION = 'Exceptions';
-
Attributes
protected static $_markdownParser = null;
-
protected $_generatedTestSuites = [];
-
protected $_codeBlockHandlers = [];
-
Methods
-
public function addCodeBlockHandler(Kitab\Compiler\Target\DocTest\CodeBlockHandler\Definition $codeBlockHandler): self
-
-
public function removeCodeBlockHandler(Kitab\Compiler\Target\DocTest\CodeBlockHandler\Definition $codeBlockHandler): self
-
-
public function compile(Kitab\Compiler\IntermediateRepresentation\File $file)
-
-
protected function compileEntity(Kitab\Compiler\IntermediateRepresentation\Entity $entity): string
-
-
public function assemble(array $symbols)
-
-
protected function getCodeBlocks(Kitab\Compiler\IntermediateRepresentation\Documentation $documentation): Generator
-
-
protected function parseCodeBlocks(League\CommonMark\Node\NodeWalker $walker): Generator
-
-
protected function compileToTestCases(string $testCaseName, array $codeBlock): Generator
-
-
protected function getMarkdownParser()
-
-
protected function computeTestSuiteShortName(string $shortName, string $longName): string
-
Interfaces
interface Kitab\Compiler\Target\Target
- …