Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 40-49 (lines=10) @@
37
	/**
38
	 * Tests whether enqueueing adds the latest class version to the global array.
39
	 */
40
	public function test_enqueueing_adds_the_latest_version_to_the_global_array() {
41
		enqueue_package_class( 'className', '1', 'path_to_class' );
42
		enqueue_package_class( 'className', '2', 'path_to_class_v2' );
43
44
		global $jetpack_packages_classmap;
45
		$this->assertTrue( isset( $jetpack_packages_classmap['className'] ) );
46
		$this->assertEquals( $jetpack_packages_classmap['className']['version'], '2' );
47
		$this->assertEquals( $jetpack_packages_classmap['className']['path'], 'path_to_class_v2' );
48
49
	}
50
51
	/**
52
	 * Tests whether enqueueing prioritizes the dev version of the class.

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

@@ 39-47 (lines=9) @@
36
	/**
37
	 * Tests whether enqueueing adds the latest file version to the global array.
38
	 */
39
	public function test_enqueueing_adds_the_latest_version_to_the_global_array() {
40
		enqueue_package_file( 'file_id', '1', 'path_to_file' );
41
		enqueue_package_file( 'file_id', '2', 'path_to_file_v2' );
42
43
		global $jetpack_packages_filemap;
44
		$this->assertTrue( isset( $jetpack_packages_filemap['file_id'] ) );
45
		$this->assertEquals( $jetpack_packages_filemap['file_id']['version'], '2' );
46
		$this->assertEquals( $jetpack_packages_filemap['file_id']['path'], 'path_to_file_v2' );
47
	}
48
49
	/**
50
	 * Tests whether enqueueing prioritizes the dev version of the file.