Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
check for array or object
  • Loading branch information
glendaviesnz authored and aristath committed Feb 3, 2023
commit 369bda5f9a3e6fc478615458959cbdf46d548e11
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,11 @@ public function test_update_item_valid_styles_css() {
);
$response = rest_get_server()->dispatch( $request );
$data = $response->get_data();
echo var_dump( $data );
$this->assertSame( 'body { color: red; }', $data['styles']['css'] );
if (is_array($data['styles'])) {
$this->assertSame( 'body { color: red; }', $data['styles']['css'] );
} else {
$this->assertSame( 'body { color: red; }', $data['styles']->css );
}
}

/**
Expand Down