|
@@ 131-138 (lines=8) @@
|
| 128 |
|
/** |
| 129 |
|
* @covers Automattic\Jetpack\Status::is_multi_network |
| 130 |
|
*/ |
| 131 |
|
public function test_is_multi_network_when_multiple_networks() { |
| 132 |
|
$this->mock_wpdb_get_var( 2 ); |
| 133 |
|
Functions\when( 'is_multisite' )->justReturn( true ); |
| 134 |
|
|
| 135 |
|
$this->assertTrue( $this->status->is_multi_network() ); |
| 136 |
|
|
| 137 |
|
$this->clean_mock_wpdb_get_var(); |
| 138 |
|
} |
| 139 |
|
|
| 140 |
|
/** |
| 141 |
|
* @covers Automattic\Jetpack\Status::is_single_user_site |
|
@@ 155-163 (lines=9) @@
|
| 152 |
|
/** |
| 153 |
|
* @covers Automattic\Jetpack\Status::is_single_user_site |
| 154 |
|
*/ |
| 155 |
|
public function test_is_single_user_site_with_one_user() { |
| 156 |
|
$this->mock_wpdb_get_var( 1 ); |
| 157 |
|
Functions\when( 'get_transient' )->justReturn( false ); |
| 158 |
|
Functions\when( 'set_transient' )->justReturn( true ); |
| 159 |
|
|
| 160 |
|
$this->assertTrue( $this->status->is_single_user_site() ); |
| 161 |
|
|
| 162 |
|
$this->clean_mock_wpdb_get_var(); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
/** |
| 166 |
|
* @covers Automattic\Jetpack\Status::is_single_user_site |
|
@@ 168-176 (lines=9) @@
|
| 165 |
|
/** |
| 166 |
|
* @covers Automattic\Jetpack\Status::is_single_user_site |
| 167 |
|
*/ |
| 168 |
|
public function test_is_single_user_site_with_multiple_users() { |
| 169 |
|
$this->mock_wpdb_get_var( 3 ); |
| 170 |
|
Functions\when( 'get_transient' )->justReturn( false ); |
| 171 |
|
Functions\when( 'set_transient' )->justReturn( true ); |
| 172 |
|
|
| 173 |
|
$this->assertFalse( $this->status->is_single_user_site() ); |
| 174 |
|
|
| 175 |
|
$this->clean_mock_wpdb_get_var(); |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
|
| 179 |
|
/** |