Changeset 38430 for trunk/tests/phpunit/tests/http/http.php
- Timestamp:
- 08/29/2016 02:41:56 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/http.php
r36749 r38430 119 119 120 120 } 121 122 /** 123 * @ticket 37768 124 */ 125 public function test_normalize_cookies_scalar_values() { 126 $http = _wp_http_get_object(); 127 128 $cookies = array( 129 'x' => 'foo', 130 'y' => 2, 131 'z' => 0.45, 132 'foo' => array( 'bar' ), 133 ); 134 135 $cookie_jar = $http->normalize_cookies( array( 136 'x' => 'foo', 137 'y' => 2, 138 'z' => 0.45, 139 'foo' => array( 'bar' ), 140 ) ); 141 142 $this->assertInstanceOf( 'Requests_Cookie_Jar', $cookie_jar ); 143 144 foreach( array_keys( $cookies ) as $cookie ) { 145 if ( 'foo' === $cookie ) { 146 $this->assertFalse( isset( $cookie_jar[ $cookie ] ) ); 147 } else { 148 $this->assertInstanceOf( 'Requests_Cookie', $cookie_jar[ $cookie ] ); 149 } 150 } 151 } 121 152 }
Note: See TracChangeset
for help on using the changeset viewer.