Skip to content
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

config-file example throws #18

Closed
ghost opened this issue May 24, 2017 · 1 comment · Fixed by #19
Closed

config-file example throws #18

ghost opened this issue May 24, 2017 · 1 comment · Fixed by #19

Comments

@ghost
Copy link

ghost commented May 24, 2017

Using kahlan@3.1.4 and given the following snippet from https://kahlan.github.io/docs/config-file.html:

// Use the `Coveralls` class to write the JSON coverage into a file
Coveralls::write([
    'coverage' => $coverage,
    'file' => $this->commandLine()->get('coverage-coveralls'),
    'service_name' => 'travis-ci',
    'service_job_id' => getenv('TRAVIS_JOB_ID') ?: null
]);

The following error is produced upon compiling:

PHP Fatal error:  Uncaught Error: Call to a member function export()

I traced the code through the specs and it seems the issue is due to a given Exporters write method wanting to take an instantiated Collector object as an input 'collector' option.

@ghost
Copy link
Author

ghost commented May 24, 2017

Think I found my answer, thanks to kahlan dogfooding its own config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants