[wp-trac] [WordPress Trac] #11159: WP_SITEURL and bloginfo('siteurl') inconsistent, or WP_SITEURL should be defined

WordPress Trac noreply at wordpress.org
Wed Oct 11 10:49:17 UTC 2017


#11159: WP_SITEURL and bloginfo('siteurl') inconsistent, or WP_SITEURL should be
defined
--------------------------------------------+-----------------------
 Reporter:  anmari                          |       Owner:
     Type:  defect (bug)                    |      Status:  reopened
 Priority:  normal                          |   Milestone:
Component:  General                         |     Version:
 Severity:  minor                           |  Resolution:
 Keywords:  WP_SITEURL constants has-patch  |     Focuses:
--------------------------------------------+-----------------------

Comment (by miyauchi):

 Following tests is passed.


 {{{
         /**
          * @runInSeparateProcess
          * @preserveGlobalState disabled
          */
         function test_wp_home_url_constant() {
                 define( 'WP_HOME', 'https://example.com' );
                 $this->assertEquals( WP_HOME, home_url() );
         }
 }}}

 But following is failed.


 {{{
         /**
          * @runInSeparateProcess
          * @preserveGlobalState disabled
          */
         function test_wp_siteurl_constant() {
                 define( 'WP_SITEURL', 'https://example.com' );
                 $this->assertEquals( WP_SITEURL, site_url() );
         }
 }}}

 And also, following will be passed.


 {{{
 $this->assertEquals( WP_SITEURL, get_option( 'siteurl' ) );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/11159#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list