Commit Graph

4 Commits

Author SHA1 Message Date
Nestor Soriano 7485b9165f Convert optional-before-required arguments to required.
In PHP 8 required parameters after optional parameters in
function/method signatures trigger a deprecation notice. These type
of parameters are pointless since a value needs to always be
provided for them anyway, so they are actually de-facto required.

This commit converts all these not-so-optional parameters into
truly required parameters by removing their default values.
2020-10-02 09:45:09 +02:00
Nestor Soriano a3ee904081 Add login_as_role and login_as_administrator to WC_Unit_Test_Case.
Those methods are a convenient replacement for
"this->factory->user->create". Tests that were using that to
simulate user login have been modified to use the new methods.
2020-07-14 11:42:21 +02:00
Nestor Soriano 9c2a43bfd5 Fix code sniffer errors in a few unit test files. 2020-07-14 11:42:21 +02:00
Christopher Allford b5bd8225e8 Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00