Skip to content

Cannot use with newer PHPUnit versions #17

@XedinUnknown

Description

@XedinUnknown

The Symptom

Even when using the trait instead of extending Xpmock\TestCase, PHPUnit halts with the following message:

Argument 2 passed to Xpmock\MockWriter::__construct() must be an instance of PHPUnit_Framework_TestCase, instance of My\TestCase given, called in src/Xpmock/TestCaseTrait.php on line 14

Possible Cause

Xpmock\MockWriter depends on e.g. PHPUnit_Framework_TestCase. Newer PHPUnit classes use namespaces instead of PSR-0.

Suggested Solution

Re-factor to use PSR-4 classnames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions