pestPHP on OctoberCMS 3.0

Greetings to all !

Does anybody know how to install and use pestPHP in OctoberCMS 3 (for testing the code) ?

Thanks a lot and have a nice day !

Best regards
Jan

Hi @Najbo

Welcome to the forum. The installation instructions seem to work fine using OCMS v3, however, on the final step it shows an error:

 The class `Tests\TestCase` was not found.

I’m not sure if this is because the instructions are lacking or if something went wrong with the initialization. You should contact the project manager for support.

I hope this helps.

Hi Sam, thanks a lot for your comment and tests. I will drop a note / request on Github/pestPHP.

1 Like

I added to composer.json

"config": {
        "preferred-install": "dist",
        "allow-plugins": {
            "composer/installers": true,
            "pestphp/pest-plugin": true
        }
    },
    "autoload": {
        "psr-4": {
            "System\\Console\\": "modules/system/console"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },

And it worked