File tree Expand file tree Collapse file tree
tests/phpunit/integration/Modules/Analytics_4/Advanced_Tracking Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424class 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
You can’t perform that action at this time.
0 commit comments