@@ 24-32 (lines=9) @@ | ||
21 | Mock::disableAll(); |
|
22 | } |
|
23 | ||
24 | public function test_jitm_disabled_by_filter() { |
|
25 | $this->mock_filters( array( |
|
26 | array( 'jetpack_just_in_time_msgs', false, false ), |
|
27 | ) ); |
|
28 | ||
29 | $this->assertFalse( Jetpack_JITM::init() ); |
|
30 | ||
31 | $this->clear_mock_filters(); |
|
32 | } |
|
33 | ||
34 | public function test_jitm_enabled_by_default() { |
|
35 | $this->mock_filters( array( |
|
@@ 34-42 (lines=9) @@ | ||
31 | $this->clear_mock_filters(); |
|
32 | } |
|
33 | ||
34 | public function test_jitm_enabled_by_default() { |
|
35 | $this->mock_filters( array( |
|
36 | array( 'jetpack_just_in_time_msgs', false, true ), |
|
37 | ) ); |
|
38 | ||
39 | $this->assertTrue( ! ! Jetpack_JITM::init() ); |
|
40 | ||
41 | $this->clear_mock_filters(); |
|
42 | } |
|
43 | ||
44 | protected function mock_filters( $filters ) { |
|
45 | $this->mocked_filters = $filters; |