Code Duplication    Length = 12-12 lines in 2 locations

packages/connection/tests/php/test_Manager.php 2 locations

@@ 238-249 (lines=12) @@
235
	 *
236
	 * @covers Automattic\Jetpack\Connection\Manager::delete_all_connection_tokens
237
	 */
238
	public function test_delete_all_connection_tokens() {
239
		( new Plugin( 'plugin-slug-1' ) )->add( 'Plugin Name 1' );
240
241
		( new Plugin( 'plugin-slug-2' ) )->add( 'Plugin Name 2' );
242
243
		$stub = $this->createMock( Plugin::class );
244
		$stub->method( 'is_only' )
245
			->willReturn( false );
246
		$manager = ( new Manager() )->set_plugin_instance( $stub );
247
248
		$this->assertFalse( $manager->delete_all_connection_tokens() );
249
	}
250
251
	/**
252
	 * Unit test for the "Disconnect from WP" functionality.
@@ 256-267 (lines=12) @@
253
	 *
254
	 * @covers Automattic\Jetpack\Connection\Manager::disconnect_site_wpcom
255
	 */
256
	public function test_disconnect_site_wpcom() {
257
		( new Plugin( 'plugin-slug-1' ) )->add( 'Plugin Name 1' );
258
259
		( new Plugin( 'plugin-slug-2' ) )->add( 'Plugin Name 2' );
260
261
		$stub = $this->createMock( Plugin::class );
262
		$stub->method( 'is_only' )
263
			->willReturn( false );
264
		$manager = ( new Manager() )->set_plugin_instance( $stub );
265
266
		$this->assertFalse( $manager->disconnect_site_wpcom() );
267
	}
268
269
	/**
270
	 * Test the `jetpack_connection_custom_caps' method.