RoboFile.php 831 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * This is project's console commands configuration for Robo task runner.
  4. *
  5. * @see http://robo.li/
  6. */
  7. class RoboFile extends \Robo\Tasks
  8. {
  9. // define public methods as commands
  10. public function prepare()
  11. {
  12. $config = json_decode(file_get_contents(__DIR__ . '/composer.json'), true);
  13. $config['name'] = 'codeception/phpunit-wrapper-test';
  14. $config['require-dev']['codeception/codeception'] = getenv('CODECEPTION_VERSION');
  15. $config['replace'] = ['codeception/phpunit-wrapper' => '*'];
  16. file_put_contents(__DIR__ . '/composer.json', json_encode($config));
  17. }
  18. public function test($params)
  19. {
  20. return $this->taskExec(__DIR__ . '/vendor/bin/codecept run ' . $params)
  21. ->dir(__DIR__ .'/vendor/codeception/codeception')
  22. ->run();
  23. }
  24. }