Changeset 40577
- Timestamp:
- 05/07/2017 04:08:42 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-request.php
r40105 r40577 287 287 */ 288 288 public function remove_header( $key ) { 289 $key = $this->canonicalize_header_name( $key ); 289 290 unset( $this->headers[ $key ] ); 290 291 } -
trunk/tests/phpunit/tests/rest-api/rest-request.php
r40105 r40577 30 30 $this->assertNull( $this->request->get_header( 'missing' ) ); 31 31 $this->assertNull( $this->request->get_header_as_array( 'missing' ) ); 32 } 33 34 public function test_remove_header() { 35 $this->request->add_header( 'Test-Header', 'value' ); 36 $this->assertEquals( 'value', $this->request->get_header( 'Test-Header' ) ); 37 38 $this->request->remove_header( 'Test-Header' ); 39 $this->assertNull( $this->request->get_header( 'Test-Header' ) ); 32 40 } 33 41
Note: See TracChangeset
for help on using the changeset viewer.