Home > Net >  Paratest, possible to test a specific function?
Paratest, possible to test a specific function?

Time:03-17

I run tests against a user Module using this command

./vendor/bin/paratest -pauto modules/User

That runs each test within the modules/User/Tests folder

I want to run a specific function in a specific file within the modules/User/Tests file

path would be: modules/User/Tests/UserTest.php

the function I am aiming to test is:

function testUserSearch() { }

I just want to test testUserSearch

Is there a way to do it using paratest?

CodePudding user response:

With paratest you can use the "filter" & "functional" options to test class or method:

./vendor/bin/paratest --functional --filter=testUserSearch

  • Related