Skip to content

Commit

Permalink
Align array assignments in long test file
Browse files Browse the repository at this point in the history
  • Loading branch information
kadamwhite committed Jul 21, 2020
1 parent 4e04c42 commit 07ac1aa
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions tests/inc/class-test-asset-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ public function provide_is_css_cases() {
*/
public function test_register_prod_script() : void {
Asset_Loader\enqueue_asset( $this->prod_manifest, 'editor.js', [
'handle' => 'custom-handle',
'handle' => 'custom-handle',
'dependencies' => [ 'wp-data' ],
] );

$this->assertEquals(
[
'handle' => 'custom-handle',
'src' => 'https://my.theme/uri/fixtures/editor.03bfa96fd1c694ca18b3.js',
'deps' => [ 'wp-data' ],
'ver' => null,
'handle' => 'custom-handle',
'src' => 'https://my.theme/uri/fixtures/editor.03bfa96fd1c694ca18b3.js',
'deps' => [ 'wp-data' ],
'ver' => null,
],
$this->scripts->get_registered( 'custom-handle' )
);
Expand All @@ -135,16 +135,16 @@ public function test_register_prod_script() : void {
*/
public function test_enqueue_prod_script() : void {
Asset_Loader\enqueue_asset( $this->prod_manifest, 'editor.js', [
'handle' => 'custom-handle',
'handle' => 'custom-handle',
'dependencies' => [ 'wp-data' ],
] );

$this->assertEquals(
[
'handle' => 'custom-handle',
'src' => 'https://my.theme/uri/fixtures/editor.03bfa96fd1c694ca18b3.js',
'deps' => [ 'wp-data' ],
'ver' => null,
'handle' => 'custom-handle',
'src' => 'https://my.theme/uri/fixtures/editor.03bfa96fd1c694ca18b3.js',
'deps' => [ 'wp-data' ],
'ver' => null,
],
$this->scripts->get_registered( 'custom-handle' )
);
Expand All @@ -157,16 +157,16 @@ public function test_register_css_asset_production() : void {
$this->prod_manifest,
'frontend-styles.css',
[
'handle' => 'frontend-styles',
'handle' => 'frontend-styles',
'dependencies' => [ 'dependency-style' ],
]
);
$this->assertEquals(
[
'handle' => 'frontend-styles',
'src' => 'https://my.theme/uri/fixtures/frontend-styles.96a500e3dd1eb671f25e.css',
'deps' => [ 'dependency-style' ],
'ver' => null,
'src' => 'https://my.theme/uri/fixtures/frontend-styles.96a500e3dd1eb671f25e.css',
'deps' => [ 'dependency-style' ],
'ver' => null,
],
$this->styles->get_registered( 'frontend-styles' )
);
Expand All @@ -177,25 +177,25 @@ public function test_register_css_asset_dev() : void {
$this->dev_manifest,
'frontend-styles.css',
[
'handle' => 'frontend-styles',
'handle' => 'frontend-styles',
'dependencies' => [ 'dependency-style' ],
]
);
$this->assertEquals(
[
'handle' => 'frontend-styles',
'src' => 'https://localhost:9090/build/frontend-styles.js',
'deps' => [],
'ver' => '499bb147f8e7234d957a47ac983e19e7',
'src' => 'https://localhost:9090/build/frontend-styles.js',
'deps' => [],
'ver' => '499bb147f8e7234d957a47ac983e19e7',
],
$this->scripts->get_registered( 'frontend-styles' )
);
$this->assertEquals(
[
'handle' => 'frontend-styles',
'src' => false,
'deps' => [ 'dependency-style' ],
'ver' => '499bb147f8e7234d957a47ac983e19e7',
'src' => false,
'deps' => [ 'dependency-style' ],
'ver' => '499bb147f8e7234d957a47ac983e19e7',
],
$this->styles->get_registered( 'frontend-styles' )
);
Expand All @@ -206,33 +206,33 @@ public function test_register_css_asset_then_corresponding_js_asset_dev() : void
$this->dev_manifest,
'editor.css',
[
'handle' => 'editor',
'handle' => 'editor',
'dependencies' => [ 'style-dependency' ],
]
);
Asset_Loader\register_asset(
$this->dev_manifest,
'editor.js',
[
'handle' => 'editor',
'handle' => 'editor',
'dependencies' => [ 'script-dependency' ],
]
);
$this->assertEquals(
[
'handle' => 'editor',
'src' => 'https://localhost:9090/build/editor.js',
'deps' => [ 'script-dependency' ],
'ver' => '499bb147f8e7234d957a47ac983e19e7',
'src' => 'https://localhost:9090/build/editor.js',
'deps' => [ 'script-dependency' ],
'ver' => '499bb147f8e7234d957a47ac983e19e7',
],
$this->scripts->get_registered( 'editor' )
);
$this->assertEquals(
[
'handle' => 'editor',
'src' => false,
'deps' => [ 'style-dependency' ],
'ver' => '499bb147f8e7234d957a47ac983e19e7',
'src' => false,
'deps' => [ 'style-dependency' ],
'ver' => '499bb147f8e7234d957a47ac983e19e7',
],
$this->styles->get_registered( 'editor' )
);
Expand Down

0 comments on commit 07ac1aa

Please sign in to comment.