Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test coverage to handler and return sequence classes #219

Merged
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d84d7d8
Update dependencies
unfulvio-godaddy Jun 20, 2023
bacc7df
suppress couple of phpstan issues (subject to refactoring/fix later)
unfulvio-godaddy Jun 20, 2023
675ecf4
Remove items from phpstan baseline
unfulvio-godaddy Jun 20, 2023
3702d6e
Restore baseline for function-mocks for now
unfulvio-godaddy Jun 20, 2023
3a547e5
Restore couple of baseline entries
unfulvio-godaddy Jun 20, 2023
b283f1f
Update dependencies
unfulvio-godaddy Jun 20, 2023
6a381b0
Update phpstan baseline
unfulvio-godaddy Jun 20, 2023
67a2288
Update return type of mockStaticMethod
unfulvio-godaddy Jun 20, 2023
5dcc103
Update return types
unfulvio-godaddy Jun 20, 2023
4d4187e
Make Expectation the only return type documented in phpstan
unfulvio-godaddy Jun 20, 2023
d74daaa
Update phpstan baseline
unfulvio-godaddy Jun 20, 2023
8240eef
Return Expectation instead of contract
unfulvio-godaddy Jun 20, 2023
9cbbcb6
Move ReturnSequence to Functions namespace
unfulvio-godaddy Jun 27, 2023
078836b
Add ReturnSequenceTest
unfulvio-godaddy Jun 27, 2023
b507018
Update ReturnSequenceTest
unfulvio-godaddy Jun 27, 2023
9a9e1d8
Refactor Functions\Handler
unfulvio-godaddy Jun 27, 2023
e166ca1
Declar functions property types as arrays
unfulvio-godaddy Jun 27, 2023
b43914f
Fix failing test
unfulvio-godaddy Jun 27, 2023
fcf480b
Update phpstan baseline
unfulvio-godaddy Jun 27, 2023
03a1b6f
Add HandlerTest
unfulvio-godaddy Jun 27, 2023
64f9dfe
Merge branch 'trunk' into chore/add-test-coverage-to-handler-and-retu…
unfulvio-godaddy Jun 28, 2023
0cf27f2
Update HandlerTest
unfulvio-godaddy Jun 28, 2023
c537872
Update failing test
unfulvio-godaddy Jun 29, 2023
3e9c1d1
Assert function exists
unfulvio-godaddy Jun 29, 2023
67a6ff8
Fix flaky test
unfulvio-godaddy Jun 29, 2023
fb26c0e
Merge branch 'trunk' into update-dependencies
unfulvio-godaddy Jun 29, 2023
d61d7fe
Merge branch 'update-dependencies' into chore/add-test-coverage-to-ha…
unfulvio-godaddy Jun 29, 2023
9f9a943
Set return value accessible in test
unfulvio-godaddy Jun 29, 2023
1a24dba
Set return value accessible in tests
unfulvio-godaddy Jun 29, 2023
32676c8
Add testPredefinedReturnFunctions
unfulvio-godaddy Jun 29, 2023
8282fff
Add test for _n
unfulvio-godaddy Jun 29, 2023
b954934
Add testPredefinedEchoFunctions
unfulvio-godaddy Jun 29, 2023
3294810
Merge branch 'trunk' into update-dependencies
unfulvio-godaddy Jun 30, 2023
ac90531
Merge branch 'update-dependencies' into chore/add-test-coverage-to-ha…
unfulvio-godaddy Jul 3, 2023
4e668cb
Fix merge conflict
unfulvio-godaddy Jul 5, 2023
4e00dda
Update phpstan baseline
unfulvio-godaddy Jul 5, 2023
faef8b6
Merge branch 'trunk' into chore/add-test-coverage-to-handler-and-retu…
unfulvio-godaddy Jul 5, 2023
f9fc148
Remove phpstan ignores
unfulvio-godaddy Jul 5, 2023
c1a88ff
Add type to array
unfulvio-godaddy Jul 5, 2023
71c133d
Throw expectation failed if ob_get_clean returns false
unfulvio-godaddy Jul 5, 2023
4afd1ff
Close parenthesis
unfulvio-godaddy Jul 5, 2023
35565db
Close parenthesis and update exception message
unfulvio-godaddy Jul 5, 2023
0bde0e3
Update types in Handler
unfulvio-godaddy Jul 5, 2023
482a9e8
Update exception message
unfulvio-godaddy Jul 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update return types
  • Loading branch information
unfulvio-godaddy committed Jun 20, 2023
commit 5dcc103ce13dc46d41ef3eb3250b77cfed34c033
12 changes: 6 additions & 6 deletions php/WP_Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public static function assertHooksAdded()
*
* @param string $function function name
* @param array<string, mixed> $args optional arguments to set expectations
* @return Mockery\Expectation|Mockery\CompositeExpectation
* @return Mockery\Expectation|Mockery\ExpectationInterface
* @throws InvalidArgumentException
*/
public static function userFunction(string $function, array $args = [])
Expand All @@ -464,7 +464,7 @@ public static function userFunction(string $function, array $args = [])
*
* @param string $function function name
* @param array<string, mixed> $args optional arguments
* @return Mockery\Expectation|Mockery\CompositeExpectation
* @return Mockery\Expectation|Mockery\ExpectationInterface
* @throws InvalidArgumentException
*/
public static function wpFunction(string $function, array $args = [])
Expand All @@ -485,7 +485,7 @@ public static function wpFunction(string $function, array $args = [])
*
* @param string $function function name
* @param array<string, mixed>|scalar $args optional arguments
* @return Mockery\Expectation|Mockery\CompositeExpectation
* @return Mockery\Expectation|Mockery\ExpectationInterface
* @throws InvalidArgumentException
*/
public static function echoFunction(string $function, $args = [])
Expand All @@ -510,7 +510,7 @@ public static function echoFunction(string $function, $args = [])
*
* @param string $function function name
* @param array<string, mixed>|scalar $args function arguments (optional)
* @return Mockery\Expectation|Mockery\CompositeExpectation
* @return Mockery\Expectation|Mockery\ExpectationInterface
* @throws InvalidArgumentException
*/
public static function passthruFunction(string $function, $args = [])
Expand All @@ -531,7 +531,7 @@ public static function passthruFunction(string $function, $args = [])
*
* @param string $function function name
* @param array<string, mixed>|scalar $args function arguments (optional)
* @return Mockery\Expectation|Mockery\CompositeExpectation
* @return Mockery\Expectation|Mockery\ExpectationInterface
* @throws InvalidArgumentException
*/
public static function wpPassthruFunction(string $function, $args = [])
Expand All @@ -549,7 +549,7 @@ public static function wpPassthruFunction(string $function, $args = [])
* @param string $function function to alias
* @param string&callable $aliasFunction actual function
* @param array<int|string, mixed>|scalar $args optional arguments
* @return Mockery\Expectation|Mockery\CompositeExpectation
* @return Mockery\Expectation|Mockery\ExpectationInterface
* @throws InvalidArgumentException
*/
public static function alias(string $function, string $aliasFunction, $args = [])
Expand Down