Skip to content

Commit

Permalink
Add missing mocking for get_option in functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed Jun 1, 2017
1 parent 90d8845 commit 537d1b1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/src/FunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Inpsyde\Wonolog\Tests;

use Brain\Monkey;
Expand Down Expand Up @@ -46,7 +47,7 @@ protected function tearDown() {
parent::tearDown();
}

private function mock_hook_functions( ) {
private function mock_hook_functions() {

Functions::when( 'add_action' )
->alias(
Expand Down Expand Up @@ -99,6 +100,10 @@ function () {
}
);

Functions::expect( 'get_option' )
->with( 'permalink_structure' )
->andReturn( FALSE );

}

/**
Expand Down Expand Up @@ -144,6 +149,7 @@ function ( array $callbacks ) use ( &$args, $filter, $hook ) {
array_walk(
$callbacks,
function ( callable $callback ) use ( &$args, $filter, $hook ) {

$value = call_user_func_array( $callback, $args );
$filter and $args[ 0 ] = $value;
}
Expand Down

0 comments on commit 537d1b1

Please sign in to comment.