3
votes

I am using Eclipse pdt for PHP Developers Version: Oxygen.2 Release (4.7.2). I created a Composer Project and I added those dependencies:

dependencies

then I created a TestCase file to test my class. I could not change the superclass "PHPUnit_Framework_TestCase".

I got this warning when creating the TestCase file

There is no element 'PHPUnit_Framework_TestCase' in the project 'PayementAPI'

then into the default TestCase Class created I changed the extends "PHPUnit_Framework_TestCase" to "TestCase" and I added the import.

    <?php
    use PHPUnit\Framework\TestCase;
    include 'otherClass.php';

    /**
     * MyClass1 test case.
     */
    class MyClass1Test extends TestCase
    {
     ...
    }

Then I tried to run my class test as PHPUnit test but got this error:

PHP Fatal error: Declaration of PHPUnitLogger::flush() must be compatible with PHPUnit\Util\Printer::flush(): void in C:\Users\User\AppData\Local\Temp\phpunit_printer\PHPUnitLogger.php on line 33

1

1 Answers

-2
votes

Try one with a lower version of phpunit.phar, download the lower version here.