Testomatio - Test Management for Codeception
Codeception\Command\Shared\FileSystemTrait
, Codeception\Command\Shared\StyleTrait
Codeception templates allow creating a customized setup and configuration for your project.
An abstract class for installation template. Each init template should extend it and implement a setup
method.
Use it to build a custom setup class which can be started with codecept init
command.
This class provides various helper methods for building customized setup
public __construct($input, $output)
param \Symfony\Component\Console\Input\InputInterface
$inputparam \Symfony\Component\Console\Output\OutputInterface
$outputprotected addModulesToComposer(array $modules)
param array
$modulesreturn ?int
public addStyles($output)
param \Symfony\Component\Console\Output\OutputInterface
$outputreturn void
protected ask($question, $answer = null)
param string
$questionparam array|string|bool|null
$answerreturn mixed|string
protected breakParts($class)
param string
$classreturn string[]
protected checkInstalled($dir = β.β)
param string
$dirreturn void
protected completeSuffix($filename, $suffix)
param string
$filenameparam string
$suffixreturn string
protected createActor($name, $directory, array $suiteConfig)
param string
$nameparam string
$directoryparam array
$suiteConfigreturn void
Create an Actor class and generate actions for it.
Requires a suite config as array in 3rd parameter.
protected createDirectoryFor($basePath, $className = ββ)
param string
$basePathparam string
$classNamereturn string
protected createEmptyDirectory($dir)
param string
$dirreturn void
Create an empty directory and add a placeholder file into it
protected createFile($filename, $contents, $force = false, $flags = 0)
param string
$filenameparam string
$contentsparam bool
$forceparam int
$flagsreturn bool
protected createHelper($name, $directory, array $settings = array ( ))
param string
$nameparam string
$directoryparam array
$settingsreturn void
Create a helper class inside a directory
protected getNamespaceHeader($class)
param string
$classreturn string
protected getNamespaceString($class)
param string
$classreturn string
protected getNamespaces($class)
param string
$classreturn array
protected getShortClassName($class)
param string
$classreturn string
protected gitIgnore($path)
param string
$pathreturn void
public initDir($workDir)
param string
$workDirreturn void
Change the directory where Codeception should be installed.
protected removeSuffix($classname, $suffix)
param string
$classnameparam string
$suffixreturn string
protected say($message = ββ)
param string
$messagereturn void
Print a message to console.
protected sayError($message)
param string
$messagereturn void
Print error message
protected sayInfo($message)
param string
$messagereturn void
Print info message
protected saySuccess($message)
param string
$messagereturn void
Print a successful message
protected sayWarning($message)
param string
$messagereturn void
Print warning message
abstract public setup()
return mixed
Override this class to create customized setup.
private updateComposerClassMap($vendorDir = βvendorβ)
param string
$vendorDirreturn void