Fixed tests adding wp_normalize_path() mocks.
This commit is contained in:
1 parent
1f85d65b9b
commit
5ee99cddd4
3 files changed
+22
-1
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Rarst\Laps\Tests\Provider;
|
||||
|
||||
use Brain\Monkey\Functions;
|
||||
use Pimple\Exception\FrozenServiceException;
|
||||
use Rarst\Laps\Plugin;
|
||||
use Rarst\Laps\Provider\Record_Provider;
|
||||
@@ -24,6 +25,12 @@ class RecordTest extends LapsTestCase {
|
||||
|
||||
$this->assertNotSame( $stopwatch_a, $stopwatch_b );
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
define( 'ABSPATH', '/wp' );
|
||||
define( 'WP_CONTENT_DIR', '/wp-content/' );
|
||||
}
|
||||
Functions\expect( 'wp_normalize_path' )->zeroOrMoreTimes()->andReturnFirstArg();
|
||||
|
||||
$this->assertArrayHasKey( 'records', $container );
|
||||
|
||||
$container->extend( 'collectors', function () {} );
|
||||
|
||||
Reference in new issue
Block a user