Closed charlesng closed 4 years ago
Because it doesn't go through all of the routing, etc when doing a ControllerTest, you must provide the parameters as you've done in the last example. However, it shouldn't die without a URI, so I'll dig into that.
Direction I have the following Controller Class and would like to write some Controller test using the instruction from documentation (https://codeigniter4.github.io/userguide/testing/controllers.html
Pages.php
PagesTest
Describe the bug The 3rd test cases
testShowMeWithAbout
does not passabout
value to theshowme
function in the controller, which cause it always to pass the default value in the function.And I have tried to remove the
withURI
function in the testcase and change it as the followingand now it gave me this error after I run
./vendor/bin/phpunit
And I would like to know if I did something wrong in the test cases.
CodeIgniter 4 version Codelgniter v4.0.0-rc.3