Code Duplication    Length = 9-10 lines in 2 locations

packages/autoloader/tests/php/test_Autoloader.php 1 location

@@ 58-67 (lines=10) @@
55
	/**
56
	 * Tests that the latest version is added to the global array.
57
	 */
58
	public function test_enqueueing_adds_the_latest_version_to_the_global_array() {
59
		Autoloader\enqueue_package_class( 'className', '1', 'path_to_class' );
60
		Autoloader\enqueue_package_class( 'className', '2', 'path_to_class_v2' );
61
62
		global $jetpack_packages_classes;
63
		$this->assertTrue( isset( $jetpack_packages_classes['className'] ) );
64
		$this->assertEquals( $jetpack_packages_classes['className']['version'], '2' );
65
		$this->assertEquals( $jetpack_packages_classes['className']['path'], 'path_to_class_v2' );
66
67
	}
68
69
	/**
70
	 * Tests that the dev version is added to the global array.

packages/autoloader/tests/php/test_file_loader.php 1 location

@@ 57-65 (lines=9) @@
54
	/**
55
	 * Tests that latest version is added to the global array.
56
	 */
57
	public function test_enqueueing_adds_the_latest_version_to_the_global_array() {
58
		Autoloader\enqueue_package_file( 'file_id', '1', 'path_to_file' );
59
		Autoloader\enqueue_package_file( 'file_id', '2', 'path_to_file_v2' );
60
61
		global $jetpack_packages_files;
62
		$this->assertTrue( isset( $jetpack_packages_files['file_id'] ) );
63
		$this->assertEquals( $jetpack_packages_files['file_id']['version'], '2' );
64
		$this->assertEquals( $jetpack_packages_files['file_id']['path'], 'path_to_file_v2' );
65
	}
66
67
	/**
68
	 * Tests that dev version is added to array.