/** * Creates feature directory. * * @param string $path */ private function createFeatureDirectory($path) { mkdir($path, 0777, true); if ($this->logger) { $this->logger->directoryCreated($path, 'place your *.feature files here'); } }
/** * Creates context class file in the filesystem. * * @param string $path * @param string $content */ private function createContextFile($path, $content) { file_put_contents($path, $content); if ($this->logger) { $this->logger->fileCreated($path, 'place your definitions, transformations and hooks here'); } }
/** * Logs snippet addition to the provided path (if logger is given). * * @param AggregateSnippet $snippet * @param string $path */ private function logSnippetAddition(AggregateSnippet $snippet, $path) { if (!$this->logger) { return; } $steps = $snippet->getSteps(); $reason = sprintf("`<comment>%s</comment>` definition added", $steps[0]->getText()); $this->logger->fileUpdated($path, $reason); }