WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/08/2014 07:28:12 PM (7 years ago)
Author:
boonebgorges
Message:

Share fixtures across 'canonical' automated tests.

Sharing these fixtures results in a speed improvement of almost one minute per
run of the test suite.

My hope is that future WordPress developers will spend this extra minute with
their loved ones, for life on this earth is short, my friends, and the moments
you spend watching WP generate test data can never again be reclaimed from the
grizzled clutches of Time, and none of us are really getting younger, I mean,
geez, have you looked in the mirror lately, Gandalf?

See #30017.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical/https.php

    r30160 r30277  
    11<?php
    2 
    3 require_once dirname( dirname( __FILE__ ) ) . '/canonical.php';
    42
    53/**
     
    86 * @group query
    97 */
    10 class Tests_Canonical_HTTPS extends Tests_Canonical {
     8class Tests_Canonical_HTTPS extends WP_Canonical_UnitTestCase {
     9    function setUp() {
     10        global $wp_rewrite;
    1111
    12     function setUp() {
    1312        parent::setUp();
     13
     14        $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
     15        create_initial_taxonomies();
     16        $wp_rewrite->flush_rules();
     17        $wp_rewrite->init();
     18
    1419        $this->http  = set_url_scheme( home_url( 'sample-page/' ), 'http' );
    1520        $this->https = set_url_scheme( home_url( 'sample-page/' ), 'https' );
Note: See TracChangeset for help on using the changeset viewer.