Skip to content

Not working with PHPUnit 6.5 #21

Closed
@OndraM

Description

@OndraM

Hi, the library is not working with PHPUnit 6.5 (phpunit-mock-objects 5).

<?php declare(strict_types=1);

namespace My;

use phpmock\phpunit\PHPMock;

class WillItWorkTest extends \PHPUnit\Framework\TestCase
{
    use PHPMock;

    public function testFoo(): void
    {
        $time = $this->getFunctionMock(__NAMESPACE__, 'time');
    }
}

Results in:

PHP Fatal error: Interface 'PHPUnit_Framework_MockObject_Matcher_Invocation' not found in /.../vendor/php-mock/php-mock-phpunit/classes/DefaultArgumentRemover.php on line 15

Version of relevant installed packages:
phpunit/phpunit 6.5.1
phpunit/phpunit-mock-objects 5.0.3
php-mock/php-mock 2.0.0
php-mock/php-mock-integration 2.0.0
php-mock/php-mock-phpunit 2.0.0

May be related to sebastianbergmann/phpunit-mock-objects#388 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions