@@ 76-87 (lines=12) @@ | ||
73 | * @runInSeparateProcess |
|
74 | * @preserveGlobalState disabled |
|
75 | */ |
|
76 | public function test_enqueueing_adds_the_dev_version_to_the_global_array() { |
|
77 | defined( 'JETPACK_AUTOLOAD_DEV' ) || define( 'JETPACK_AUTOLOAD_DEV', true ); |
|
78 | ||
79 | $this->classes_handler->enqueue_package_class( 'className', '1', 'path_to_class' ); |
|
80 | $this->classes_handler->enqueue_package_class( 'className', 'dev-howdy', 'path_to_class_dev' ); |
|
81 | $this->classes_handler->enqueue_package_class( 'className', '2', 'path_to_class_v2' ); |
|
82 | ||
83 | global $jetpack_packages_classmap; |
|
84 | $this->assertTrue( isset( $jetpack_packages_classmap['className'] ) ); |
|
85 | $this->assertEquals( $jetpack_packages_classmap['className']['version'], 'dev-howdy' ); |
|
86 | $this->assertEquals( $jetpack_packages_classmap['className']['path'], 'path_to_class_dev' ); |
|
87 | } |
|
88 | ||
89 | /** |
|
90 | * Tests whether enqueueing works with autoloading. |
@@ 55-66 (lines=12) @@ | ||
52 | * @runInSeparateProcess |
|
53 | * @preserveGlobalState disabled |
|
54 | */ |
|
55 | public function test_enqueueing_adds_the_dev_version_to_the_global_array() { |
|
56 | defined( 'JETPACK_AUTOLOAD_DEV' ) || define( 'JETPACK_AUTOLOAD_DEV', true ); |
|
57 | ||
58 | $this->files_handler->enqueue_package_file( 'file_id', '1', 'path_to_file' ); |
|
59 | $this->files_handler->enqueue_package_file( 'file_id', 'dev-howdy', 'path_to_file_dev' ); |
|
60 | $this->files_handler->enqueue_package_file( 'file_id', '2', 'path_to_file_v2' ); |
|
61 | ||
62 | global $jetpack_packages_filemap; |
|
63 | $this->assertTrue( isset( $jetpack_packages_filemap['file_id'] ) ); |
|
64 | $this->assertEquals( $jetpack_packages_filemap['file_id']['version'], 'dev-howdy' ); |
|
65 | $this->assertEquals( $jetpack_packages_filemap['file_id']['path'], 'path_to_file_dev' ); |
|
66 | } |
|
67 | ||
68 | /** |
|
69 | * Tests whether enqueueing works with autoloading. |