@@ 37-52 (lines=16) @@ | ||
34 | $this->clear_enqueued_scripts(); |
|
35 | } |
|
36 | ||
37 | public function test_jitm_disabled_by_filter() { |
|
38 | $this->mock_filters( array( |
|
39 | array( 'jetpack_just_in_time_msgs', false, false ), |
|
40 | ), "Automattic\Jetpack\JITMS" ); |
|
41 | ||
42 | // Used for Status->is_development_mode(). |
|
43 | $this->mock_filters( array( |
|
44 | array( 'jetpack_just_in_time_msgs', false, false ), |
|
45 | ), "Automattic\Jetpack" ); |
|
46 | $this->mock_site_url(); |
|
47 | ||
48 | $jitm = new JITM(); |
|
49 | $this->assertFalse( $jitm->register() ); |
|
50 | ||
51 | $this->clear_mock_filters(); |
|
52 | } |
|
53 | ||
54 | public function test_jitm_enabled_by_default() { |
|
55 | $this->mock_filters( array( |
|
@@ 54-69 (lines=16) @@ | ||
51 | $this->clear_mock_filters(); |
|
52 | } |
|
53 | ||
54 | public function test_jitm_enabled_by_default() { |
|
55 | $this->mock_filters( array( |
|
56 | array( 'jetpack_just_in_time_msgs', false, true ), |
|
57 | ), "Automattic\Jetpack\JITMS" ); |
|
58 | ||
59 | // Used for Status->is_development_mode(). |
|
60 | $this->mock_filters( array( |
|
61 | array( 'jetpack_just_in_time_msgs', false, true ), |
|
62 | ), "Automattic\Jetpack" ); |
|
63 | $this->mock_site_url(); |
|
64 | ||
65 | $jitm = new JITM(); |
|
66 | $this->assertTrue( $jitm->register() ); |
|
67 | ||
68 | $this->clear_mock_filters(); |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * Pre-connection JITMs are disabled by default, |