diff --git a/tests/unit/CoreVideoTest.php b/tests/unit/CoreVideoTest.php index e22b1706..91562de6 100644 --- a/tests/unit/CoreVideoTest.php +++ b/tests/unit/CoreVideoTest.php @@ -19,8 +19,10 @@ public function setUp(): void { ' ', trim( ' - -
+ +
+ +
Sample caption
' ) @@ -48,11 +50,14 @@ public function test_retrieve_core_video_attributes() { align anchor autoplay + className + lock tracks muted caption preload src + style playsInline controls loop @@ -84,17 +89,20 @@ public function test_retrieve_core_video_attributes() { $this->assertEquals( [ - 'align' => null, - 'anchor' => null, + 'align' => 'wide', + 'anchor' => 'test-anchor', 'autoplay' => null, // @todo : 'autoplay' should be true. 'tracks' => [], - 'muted' => null, - 'caption' => null, + 'muted' => null, // @todo : 'muted' should be true. + 'caption' => 'Sample caption', + 'className' => 'test-css-class', 'preload' => 'auto', 'src' => 'http://mysite.local/wp-content/uploads/2023/07/pexels_videos_1860684-1440p.mp4', + 'style' => null, // @todo : 'style' should be '{\"spacing\":{\"margin\":{\"top\":\"var:preset|spacing|50\",\"bottom\":\"var:preset|spacing|50\",\"left\":\"var:preset|spacing|50\",\"right\":\"var:preset|spacing|50\"}}}'. 'playsInline' => null, // @todo : 'playsInline' should be true. 'controls' => true, 'loop' => null, // @todo : 'loop' should be true. + 'lock' => wp_json_encode( [ 'move' => true, 'remove' => true ] ), 'poster' => 'http://mysite.local/wp-content/uploads/2023/05/pexels-egor-komarov-14420089-scaled.jpg', 'id' => 1636.0, ],