|
@@ 35-44 (lines=10) @@
|
| 32 |
|
$this->clear_enqueued_scripts(); |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
public function test_jitm_disabled_by_filter() { |
| 36 |
|
$this->mock_filters( array( |
| 37 |
|
array( 'jetpack_just_in_time_msgs', false, false ), |
| 38 |
|
) ); |
| 39 |
|
|
| 40 |
|
$jitm = new JITM(); |
| 41 |
|
$this->assertFalse( $jitm->register() ); |
| 42 |
|
|
| 43 |
|
$this->clear_mock_filters(); |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
public function test_jitm_enabled_by_default() { |
| 47 |
|
$this->mock_filters( array( |
|
@@ 46-55 (lines=10) @@
|
| 43 |
|
$this->clear_mock_filters(); |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
public function test_jitm_enabled_by_default() { |
| 47 |
|
$this->mock_filters( array( |
| 48 |
|
array( 'jetpack_just_in_time_msgs', false, true ), |
| 49 |
|
) ); |
| 50 |
|
|
| 51 |
|
$jitm = new JITM(); |
| 52 |
|
$this->assertTrue( $jitm->register() ); |
| 53 |
|
|
| 54 |
|
$this->clear_mock_filters(); |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
/** |
| 58 |
|
* This is an example of a test which uses Mockery to tests a class static method. |