Skip to content

Commit da3792b

Browse files
committed
testcase follows
1 parent 7f681e5 commit da3792b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/wpunit/AssetsTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public function it_should_accept_instance_of_asset_or_array_of_assets_in_registe
5656

5757
$assets = Assets::init();
5858

59+
$assets->register_in_wp( null ); // No problemo... nothing happens though.
60+
$assets->register_in_wp( [] ); // No problemo... nothing happens though.
61+
5962
$this->assertFalse( $asset_1->is_registered() );
6063
$assets->register_in_wp( $asset_1 );
6164
$this->assertTrue( $asset_1->is_registered() );
@@ -77,9 +80,7 @@ public function invalid_params_for_register_in_wp_provider(): Generator {
7780
yield 'float' => [ fn() => 1.1 ];
7881
yield 'bool - true' => [ fn() => true ];
7982
yield 'bool - false' => [ fn() => false ];
80-
yield 'null' => [ fn() => null ];
8183
yield 'object' => [ fn() => new stdClass() ];
82-
yield 'array' => [ fn() => [] ];
8384
yield 'array - mixed' => [ fn () => [ Asset::add( 'fake1-script', 'fake1.js' ), 'string' ] ];
8485
}
8586

0 commit comments

Comments
 (0)