Cakephp 4.x run all core tests using phpunit

I am trying run all test cases using phpunit on local but no lock

I have modified cakephp/src/View/Helper/FormHelper.php and tried to create pull request to merge, but when github running all tests, it failed all time,

However I made changes in https://github.com/chetanvarshney/cakephp/blob/patch-1/tests/TestCase/View/Helper/FormHelperTest.php
but still I did not make all required changes.

see failed tests here

My question how can I run these core tests on local using phpunit to save time and avoiding false pull requests.

Thanks

What, exactly, are you doing to try to run them? What’s not working about that process?

My first question would rather be: Why are you creating a fork of the cakephp core to just adjust the FormHelper if you can just use a custom FormHelper yourself?

Seems the intent here is to contribute to the core version, not make a separate fork.

Yes I am trying to contribute to the core version.

See when we edit cakephp core files, github creates a fork and allow to edit files. after finishing changes we create pull request, then github runs all checks.

If you closely check this page Update FormHelper.php · cakephp/cakephp@cd6f8ec · GitHub You see failed tests here.

My question is what is the way to run these tests without creating Pull request (to fix errors before sending pull request) on github or on localhost.

OR
How can I run all cakephp core test cases on localhost using phpunit

Locally all you need is one of those PHP versions installed (with the required PHP modules like sqlite) so you can execute

vendor/bin/phpunit tests/TestCase/View/Helper/FormHelperTest.php

expecting you already installed composer modules via composer install before of course.

Thaniks @KevinPfeifer I tried to install sqlite globally but not able to configure, also I see sqlite extension is enabled in wamp php extensions.

I have downloaded cakephp core test cases, they were not downloaded in fresh cakephp install because they were in export-ignore, however I managed to download them.

when I try to run
phpunit vendor\cakephp\cakephp\tests\TestCase\View\Helper\FormHelperTest.php
I am getting errors

1) Cake\Test\TestCase\View\Helper\FormHelperTest::testConstructTemplatesFile
Cake\Database\Exception\DatabaseException: Cannot describe articles. It has 0 columns.

D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\Database\Schema\Collection.php:120
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\TestSuite\Fixture\FixtureHelper.php:284
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\TestSuite\Fixture\FixtureHelper.php:249
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\TestSuite\Fixture\FixtureHelper.php:138
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\TestSuite\Fixture\FixtureHelper.php:123
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\TestSuite\Fixture\FixtureHelper.php:136
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\TestSuite\Fixture\TruncateStrategy.php:52
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\TestSuite\TestCase.php:301
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\src\TestSuite\TestCase.php:249
D:\wamp\www\cakephp4.3.8\vendor\cakephp\cakephp\tests\TestCase\View\Helper\FormHelperTest.php:79

If I debug $this->_connection in describe( function of cakephp\cakephp\src\Database\Schema\Collection.php
I got following output

Cake\Database\Connection Object
(
    [config] => Array
        (
            [password] => *****
            [username] => *****
            [host] => *****
            [database] => *****
            [scheme] => sqlite
            [driver] => Cake\Database\Driver\Sqlite
            [persistent] =>
            [timezone] => UTC
            [flags] => Array
                (
                )

            [cacheMetadata] =>
            [quoteIdentifiers] =>
            [log] =>
            [name] => test
        )

    [driver] => Cake\Database\Driver\Sqlite Object
        (
            [connected] => 1
        )

    [transactionLevel] => 0
    [transactionStarted] =>
    [useSavePoints] =>
    [logQueries] =>
    [logger] =>
)

It seems sqlite database tabes issue, can you help me with this?

I have managed to run test case for core cakephp on local, Thanks @Zuluru @KevinPfeifer for giving your valuable time.

I will add detailed reply to help other for this issue.