Exercise 'Lucky Numbers' - test issue

There seems to be something wrong with the test code for the exercise ‘Lucky Numbers’ in the PHP track. I tested with code that passed in the online editor, here is the output:

´´´bash shell
PHPUnit 9.6.17 by Sebastian Bergmann and contributors.

EEE.EE 6 / 6 (100%)

Time: 00:00.014, Memory: 4.00 MB

There were 5 errors:

  1. LuckyNumbersTest::testSumUp
    ArgumentCountError: Too few arguments to function LuckyNumbersTest::testSumUp(), 0 passed in /usr/share/php/PHPUnit/Framework/TestCase.php on line 1612 and exactly 3 expected

/home/brats/exercism/php/lucky-numbers/LuckyNumbersTest.php:19

  1. LuckyNumbersTest::testIsPalindrome
    ArgumentCountError: Too few arguments to function LuckyNumbersTest::testIsPalindrome(), 0 passed in /usr/share/php/PHPUnit/Framework/TestCase.php on line 1612 and exactly 1 expected

/home/brats/exercism/php/lucky-numbers/LuckyNumbersTest.php:49

  1. LuckyNumbersTest::testIsNoPalindrome
    ArgumentCountError: Too few arguments to function LuckyNumbersTest::testIsNoPalindrome(), 0 passed in /usr/share/php/PHPUnit/Framework/TestCase.php on line 1612 and exactly 1 expected

/home/brats/exercism/php/lucky-numbers/LuckyNumbersTest.php:74

  1. LuckyNumbersTest::testErrorMessageForInvalidInput
    ArgumentCountError: Too few arguments to function LuckyNumbersTest::testErrorMessageForInvalidInput(), 0 passed in /usr/share/php/PHPUnit/Framework/TestCase.php on line 1612 and exactly 1 expected

/home/brats/exercism/php/lucky-numbers/LuckyNumbersTest.php:110

  1. LuckyNumbersTest::testErrorMessageForValidInput
    ArgumentCountError: Too few arguments to function LuckyNumbersTest::testErrorMessageForValidInput(), 0 passed in /usr/share/php/PHPUnit/Framework/TestCase.php on line 1612 and exactly 1 expected

/home/brats/exercism/php/lucky-numbers/LuckyNumbersTest.php:135

ERRORS!
Tests: 6, Assertions: 1, Errors: 5.
´´´

How are you running the tests?

The same exact test code should be used to test your code when the tests are run from the website or locally.

Running tests using ‘phpunit LuckyNumbersTest.php’.
Has been working fine for all previous exercises in the php track.

Hi @roger-bratseth, looks like you are using an outdated PHPUnit version (9.6). We currently expect you to use PHPUnit 11, see our track documentation for installation instructions.

Also make sure to use a supported PHP version, that’s 8.2 - 8.4. Running php -v should show the version used. Using 8.5 might give unexpected additional warnings, but should also work. You can also find installation instructions in the track documentation.

Hope that helps!

Thank you! Seems to solve the problem :-)
I had just installed using ‘apt-get phpunit’ in my Ubuntu terminal…

image