Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 28-35 (lines=8) @@
25
	/**
26
	 * Tests whether enqueueing adds a class to the global array.
27
	 */
28
	public function test_enqueueing_adds_to_the_global_array() {
29
		enqueue_package_class( 'className', '1', 'path_to_class' );
30
31
		global $jetpack_packages_classmap;
32
		$this->assertTrue( isset( $jetpack_packages_classmap['className'] ) );
33
		$this->assertEquals( $jetpack_packages_classmap['className']['version'], '1' );
34
		$this->assertEquals( $jetpack_packages_classmap['className']['path'], 'path_to_class' );
35
	}
36
37
	/**
38
	 * Tests whether enqueueing adds the latest class version to the global array.

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

@@ 27-34 (lines=8) @@
24
	/**
25
	 * Tests whether enqueueing adds a file to the global array.
26
	 */
27
	public function test_enqueueing_adds_to_the_global_array() {
28
		enqueue_package_file( 'file_id_10', '1', 'path_to_file.php' );
29
30
		global $jetpack_packages_filemap;
31
		$this->assertTrue( isset( $jetpack_packages_filemap['file_id_10'] ) );
32
		$this->assertEquals( $jetpack_packages_filemap['file_id_10']['version'], '1' );
33
		$this->assertEquals( $jetpack_packages_filemap['file_id_10']['path'], 'path_to_file.php' );
34
	}
35
36
	/**
37
	 * Tests whether enqueueing adds the latest file version to the global array.