[wp-trac] [WordPress Trac] #41871: Code Editor: Add unit tests
WordPress Trac
noreply at wordpress.org
Thu Oct 12 18:25:56 UTC 2017
#41871: Code Editor: Add unit tests
--------------------------+-----------------------
Reporter: westonruter | Owner: ryotsun
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 4.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------
Comment (by westonruter):
@ryotsun thank you, it's looking good.
Three more things I'd like you to add tests for:
* When you call `wp_enqueue_code_editor()` add calls to `wp_script_is()`
to actually confirm that all of the expected scripts got enqueued, like
you did for the Custom HTML widget.
* Add assertion in
`\Test_WP_Widget_Custom_HTML::test_enqueue_admin_scripts()` to confirm
that the `code-editor` sript gets enqueued, and thus that
`wp_enqueue_code_editor()` was called.
* Add tests for when a user turns off the `syntax_highlighting` option for
their profile, to ensure that `wp-codemirror` and related scripts do not
get enqueued.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41871#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list