ExecutorTest.php 593 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. class ExecutorTest extends \PHPUnit\Framework\TestCase
  3. {
  4. /**
  5. * @dataProvider valuesProvider
  6. */
  7. public function testRun($returnValue)
  8. {
  9. $expected = $returnValue;
  10. $executor = new \Codeception\Step\Executor(function () use ($returnValue) {
  11. return $returnValue;
  12. });
  13. $actual = $executor->run();
  14. $this->assertEquals($expected, $actual);
  15. }
  16. /**
  17. * @return array
  18. */
  19. public function valuesProvider()
  20. {
  21. return array(
  22. array(true),
  23. array(false),
  24. );
  25. }
  26. }