X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FDefinition%2FPrinter%2FConsoleDefinitionListPrinter.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FDefinition%2FPrinter%2FConsoleDefinitionListPrinter.php;h=d155d944935d1504b57e12588ac482a9b410b23a;hp=0000000000000000000000000000000000000000;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68 diff --git a/vendor/behat/behat/src/Behat/Behat/Definition/Printer/ConsoleDefinitionListPrinter.php b/vendor/behat/behat/src/Behat/Behat/Definition/Printer/ConsoleDefinitionListPrinter.php new file mode 100644 index 000000000..d155d9449 --- /dev/null +++ b/vendor/behat/behat/src/Behat/Behat/Definition/Printer/ConsoleDefinitionListPrinter.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Behat\Behat\Definition\Printer; + +use Behat\Testwork\Suite\Suite; + +/** + * Prints simple definitions list. + * + * @author Konstantin Kudryashov + */ +final class ConsoleDefinitionListPrinter extends ConsoleDefinitionPrinter +{ + /** + * {@inheritdoc} + */ + public function printDefinitions(Suite $suite, $definitions) + { + $output = array(); + + foreach ($definitions as $definition) { + $definition = $this->translateDefinition($suite, $definition); + + $output[] = strtr( + '{suite} | {type} {regex}', array( + '{suite}' => $suite->getName(), + '{type}' => $this->getDefinitionType($definition, true), + '{regex}' => $definition->getPattern(), + ) + ); + } + + $this->write(rtrim(implode(PHP_EOL, $output))); + } +}