Skip to content

Commit d9784a5

Browse files
Fix PHP test.
1 parent 65fd83b commit d9784a5

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

tests/phpunit/integration/Modules/Analytics_4/Advanced_Tracking/Script_InjectorTest.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,7 @@
2424
class Script_InjectorTest extends TestCase {
2525

2626
public function test_inject_event_script() {
27-
// Use mock context to return development script path, just so that a JS file containing the expected
28-
// placeholder string is found, regardless of whether JS build process has run.
29-
$context = $this->getMockBuilder( Context::class )
30-
->setConstructorArgs( array( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) )
31-
->setMethods( array( 'path' ) )
32-
->getMock();
33-
$context
34-
->expects( $this->once() )
35-
->method( 'path' )
36-
->willReturn( dirname( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) . '/assets/js/analytics-advanced-tracking.js' );
27+
$context = new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE );
3728

3829
$script_injector = new Script_Injector( $context );
3930

0 commit comments

Comments
 (0)