New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHPUnit_Framework_Exception] call_user_func_array() expects parameter 1 to be a valid callback #3392

Closed
kidackim opened this Issue Aug 1, 2016 · 0 comments

Comments

Projects
None yet
3 participants
@kidackim

kidackim commented Aug 1, 2016

I try separate Given, Then, When class to other file
but when I try use this config:

gherkin:
    contexts:
        default:
            - \Helper\Requests\Helper\GherkinSteps\GivenSteps
            - \Helper\Requests\Helper\GherkinSteps\ThenSteps
            - \Helper\Requests\Helper\GherkinSteps\WhenSteps

I have following error:
[PHPUnit_Framework_Exception] call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object

/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/Test/Gherkin.php:129
/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/Test/Gherkin.php:82
/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/Test/Test.php:82
/home/mariusz/Praca/cos/vendor/phpunit/phpunit/src/Framework/TestSuite.php:753
/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/PHPUnit/Runner.php:98
/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/SuiteManager.php:162
/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/Codecept.php:209
/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/Codecept.php:200
/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/Command/Run.php:251
/home/mariusz/Praca/cos/vendor/symfony/console/Command/Command.php:256
/home/mariusz/Praca/cos/vendor/symfony/console/Application.php:818
/home/mariusz/Praca/cos/vendor/symfony/console/Application.php:186
/home/mariusz/Praca/cos/vendor/symfony/console/Application.php:117
/home/mariusz/Praca/cos/vendor/codeception/codeception/src/Codeception/Application.php:103
/home/mariusz/Praca/cos/vendor/codeception/codeception/codecept:33

In version 2.2.1 everything works fine but in 2.2 and 2.3 I have problem.

Details

  • Codeception version: 2.2.3 and 2.2.1
  • PHP Version: 5.6.23
  • Operating System: Ubuntu 14
  • Installation type: Phar
  • List of installed packages (composer show)
  • Suite configuration:
class_name: RequestsTester
modules:
    enabled:
        -  Asserts
        - REST:
            depends: PhpBrowser
            part: Json
            curl:
              CURLOPT_RETURNTRANSFER: true
        - \Helper\Api
gherkin:
    contexts:
        default:
            - \Helper\Requests\Helper\GherkinSteps\GivenSteps
            - \Helper\Requests\Helper\GherkinSteps\ThenSteps
            - \Helper\Requests\Helper\GherkinSteps\WhenSteps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment