Code Duplication    Length = 8-9 lines in 3 locations

packages/status/tests/php/test-status.php 3 locations

@@ 160-167 (lines=8) @@
157
	 *
158
	 * @covers Automattic\Jetpack\Status::is_multi_network
159
	 */
160
	public function test_is_multi_network_when_multiple_networks() {
161
		$this->mock_wpdb_get_var( 2 );
162
		Functions\when( 'is_multisite' )->justReturn( true );
163
164
		$this->assertTrue( $this->status->is_multi_network() );
165
166
		$this->clean_mock_wpdb_get_var();
167
	}
168
169
	/**
170
	 * Test cached is_single_user_site
@@ 188-196 (lines=9) @@
185
	 *
186
	 * @covers Automattic\Jetpack\Status::is_single_user_site
187
	 */
188
	public function test_is_single_user_site_with_one_user() {
189
		$this->mock_wpdb_get_var( 1 );
190
		Functions\when( 'get_transient' )->justReturn( false );
191
		Functions\when( 'set_transient' )->justReturn( true );
192
193
		$this->assertTrue( $this->status->is_single_user_site() );
194
195
		$this->clean_mock_wpdb_get_var();
196
	}
197
198
	/**
199
	 * Test is_single_user_site with multiple users
@@ 203-211 (lines=9) @@
200
	 *
201
	 * @covers Automattic\Jetpack\Status::is_single_user_site
202
	 */
203
	public function test_is_single_user_site_with_multiple_users() {
204
		$this->mock_wpdb_get_var( 3 );
205
		Functions\when( 'get_transient' )->justReturn( false );
206
		Functions\when( 'set_transient' )->justReturn( true );
207
208
		$this->assertFalse( $this->status->is_single_user_site() );
209
210
		$this->clean_mock_wpdb_get_var();
211
	}
212
213
214
	/**