Changeset 51453
- Timestamp:
- 07/18/2021 02:00:35 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-controller.php
r51452 r51453 112 112 113 113 // Check sanitize testing. 114 $this->assertSame( 115 false, 114 $this->assertFalse( 116 115 rest_sanitize_request_arg( 'false', $this->request, 'someboolean' ) 117 116 ); 118 $this->assertSame( 119 false, 117 $this->assertFalse( 120 118 rest_sanitize_request_arg( '0', $this->request, 'someboolean' ) 121 119 ); 122 $this->assertSame( 123 false, 120 $this->assertFalse( 124 121 rest_sanitize_request_arg( 0, $this->request, 'someboolean' ) 125 122 ); 126 $this->assertSame( 127 false, 123 $this->assertFalse( 128 124 rest_sanitize_request_arg( 'FALSE', $this->request, 'someboolean' ) 129 125 ); 130 $this->assertSame( 131 true, 126 $this->assertTrue( 132 127 rest_sanitize_request_arg( 'true', $this->request, 'someboolean' ) 133 128 ); 134 $this->assertSame( 135 true, 129 $this->assertTrue( 136 130 rest_sanitize_request_arg( '1', $this->request, 'someboolean' ) 137 131 ); 138 $this->assertSame( 139 true, 132 $this->assertTrue( 140 133 rest_sanitize_request_arg( 1, $this->request, 'someboolean' ) 141 134 ); 142 $this->assertSame( 143 true, 135 $this->assertTrue( 144 136 rest_sanitize_request_arg( 'TRUE', $this->request, 'someboolean' ) 145 137 );
Note: See TracChangeset
for help on using the changeset viewer.