Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 46-53 (lines=8) @@
43
	/**
44
	 * Ensure enqueuing adds to the global array.
45
	 */
46
	public function test_enqueueing_adds_to_the_global_array() {
47
		Autoloader\enqueue_package_class( 'className', '1', 'path_to_class' );
48
49
		global $jetpack_packages_classes;
50
		$this->assertTrue( isset( $jetpack_packages_classes['className'] ) );
51
		$this->assertEquals( $jetpack_packages_classes['className']['version'], '1' );
52
		$this->assertEquals( $jetpack_packages_classes['className']['path'], 'path_to_class' );
53
	}
54
55
	/**
56
	 * Tests that the latest version is added to the global array.

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

@@ 45-52 (lines=8) @@
42
	/**
43
	 * Does enqueuing add to the global array?
44
	 */
45
	public function test_enqueueing_adds_to_the_global_array() {
46
		Autoloader\enqueue_package_file( 'file_id_10', '1', 'path_to_file.php' );
47
48
		global $jetpack_packages_files;
49
		$this->assertTrue( isset( $jetpack_packages_files['file_id_10'] ) );
50
		$this->assertEquals( $jetpack_packages_files['file_id_10']['version'], '1' );
51
		$this->assertEquals( $jetpack_packages_files['file_id_10']['path'], 'path_to_file.php' );
52
	}
53
54
	/**
55
	 * Tests that latest version is added to the global array.