Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test coverage for AMP_Theme_Support #1034

Merged
merged 23 commits into from
Apr 3, 2018
Merged

Add test coverage for AMP_Theme_Support #1034

merged 23 commits into from
Apr 3, 2018

Commits on Mar 26, 2018

  1. Configuration menu
    Copy the full SHA
    ce66658 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1fe5527 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7232ab5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b3c6402 View commit details
    Browse the repository at this point in the history
  5. Skip printing paths-scope because it causes push builds to be truncat…

    …ed (and fail) for unknown reason
    
    See xwp/wp-dev-lib#270
    westonruter committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    97dcdf1 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2018

  1. Add 2 PHPUnit tests for AMP_Theme_Support.

    Test init() and redirect_canonical_amp().
    @todo continue with these,
    and consider a better way to test
    redirect_canonical_amp().
    That uses wp_safe_redirect,
    which throws an error.
    Ryan Kienstra committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    4c17c67 View commit details
    Browse the repository at this point in the history
  2. Test 2 more methods in AMP_Theme_Support.

    is_customize_preview_iframe() and
    register_paired_hooks().
    Ryan Kienstra committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    4d70aa9 View commit details
    Browse the repository at this point in the history
  3. Test 3 more methods in AMP_Theme_Support.

    Test add_hooks, send_header(), and
    register_content_embed_handlers().
    Ryan Kienstra committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    ac6cac1 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2018

  1. Test 3 more methods in AMP_Theme_Support.

    Test methods related to AMP templates,
    and get_current_canonical_url().
    Ryan Kienstra committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    92ada3b View commit details
    Browse the repository at this point in the history
  2. Add comment form-related PHPUnit tests.

    Test 2 methods:
    get_comment_form_state_id() and
    filter_comment_form_defaults().
    Ryan Kienstra committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    93bf043 View commit details
    Browse the repository at this point in the history
  3. Remove the conditional around the add_action for preview scripts.

    There's a check for is_customize_preview() around add_action().
    But the callback dequeue_customize_preview_scripts()
    has its own check for is_customize_preview_iframe().
    And that has a check for is_customize_preview().
    So this ensures that the body of the callback
    never runs.
    Maybe I misread the intent of this, though.
    This also adds unit tests.
    Ryan Kienstra committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    7c704ae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f90c40a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    912ea33 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e4dedbb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ce68491 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9caf29b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    cdb6bba View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1b75fae View commit details
    Browse the repository at this point in the history
  11. Remove extra variable declarations.

    These variables are only used once,
    so they can simply be passed to the array.
    Ryan Kienstra committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    2540e86 View commit details
    Browse the repository at this point in the history
  12. Remove extra phpcs:ignore comments.

    There's already a phpcs:disable at the top of the method.
    And a phpcs:enable at the bottom.
    Ryan Kienstra committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    86f13fb View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2018

  1. Address issues from CR

    DavidCramer committed Mar 29, 2018
    Configuration menu
    Copy the full SHA
    b365e00 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2018

  1. Merge in 0.7, resolve conflicts.

    There was a minor conflict in:
    test-class-amp-theme-support.php.
    Retain both edits.
    Ryan Kienstra committed Mar 30, 2018
    Configuration menu
    Copy the full SHA
    9e87ea6 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2018

  1. Fix a failed unit test by setting $wp_styles to null.

    Before, merging in 0.7, there was an amp-default <link>.
    But test_validate_non_amp_theme() also output that.
    And that stored the script in $wp_styles->done.
    So it wasn't output again, and the test failed.
    So reset $wp_styles, so it gets re-instantiated.
    Ryan Kienstra committed Mar 31, 2018
    Configuration menu
    Copy the full SHA
    71b83fc View commit details
    Browse the repository at this point in the history