Changeset 38453
- Timestamp:
- 08/30/2016 06:30:51 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/http.php
r38452 r38453 118 118 /** 119 119 * @ticket 36356 120 */ 121 function test_wp_parse_url_with_default_component() { 122 $actual = wp_parse_url( self::$full_test_url, -1 ); 123 $this->assertEquals( array( 124 'scheme' => 'http', 125 'host' => 'host.name', 126 'port' => 9090, 127 'user' => 'username', 128 'pass' => 'password', 129 'path' => '/path', 130 'query' => 'arg1=value1&arg2=value2', 131 'fragment' => 'anchor', 132 ), $actual ); 133 } 134 135 /** 136 * @ticket 36356 120 137 * 121 138 * @dataProvider parse_url_component_testcases … … 123 140 function test_wp_parse_url_with_component( $url, $component, $expected ) { 124 141 $actual = wp_parse_url( $url, $component ); 125 $this->assert Equals( $expected, $actual );142 $this->assertSame( $expected, $actual ); 126 143 } 127 144 … … 129 146 // 0: The URL, 1: The requested component, 2: The expected resulting component. 130 147 return array( 131 array( self::$full_test_url, -1, array(132 'scheme' => 'http',133 'host' => 'host.name',134 'port' => 9090,135 'user' => 'username',136 'pass' => 'password',137 'path' => '/path',138 'query' => 'arg1=value1&arg2=value2',139 'fragment' => 'anchor',140 ) ),141 148 array( self::$full_test_url, PHP_URL_SCHEME, 'http' ), 142 149 array( self::$full_test_url, PHP_URL_USER, 'username' ),
Note: See TracChangeset
for help on using the changeset viewer.