2

When I run Behat tests directly from Windows PowerShell, the output is formatted with colour:

enter image description here

But when I run the php script runbehat.php below with the command php runbehat.php:

<?php
echo system(__DIR__.'/bin/behat --profile local');

it produces:

enter image description here

How can I make it display in colour?

Jodes
  • 14,118
  • 26
  • 97
  • 156

1 Answers1

3

Add the --colors option.

From the behat's help that you can show using -h:

--colors  Force ANSI color in the output. By default color support is
          guessed based on your platform and the output if not specified.
Youssef Bouhjira
  • 1,599
  • 2
  • 22
  • 38