Console Application Unittest

Hello everybody,

I want to run an unittest (phpunit) of my console application. But first I want to describe my situation:

I have a console application with two methods. One only for the console application and one that I want test.

The method I want to test have two parameters: one string and one array.

This method will be called in the method only for the console application.

I want to test the second method with this two parameters.

My question:

How can I run this second method in an unittest with the configuration files of the unittest?

I can’t use the “yii::$app->runAction”-call, cause of the parameters.

Can anyone help me?


Best regards

Dominik from Germany