- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/widgets/media-image-widget.php
r42343 r43571 53 53 'url', 54 54 'width', 55 ), array_keys( $schema ) 55 ), 56 array_keys( $schema ) 56 57 ); 57 58 } … … 81 82 'add_media', 82 83 'unsupported_file_type', 83 ), array_keys( $widget->l10n ) 84 ), 85 array_keys( $widget->l10n ) 84 86 ); 85 87 } … … 105 107 array( 106 108 'attachment_id' => 'media', 107 ), $instance 109 ), 110 $instance 108 111 ); 109 112 $this->assertSame( $result, $instance ); … … 120 123 array( 121 124 'url' => 'not_a_url', 122 ), $instance 125 ), 126 $instance 123 127 ); 124 128 $this->assertNotSame( $result, $instance ); … … 136 140 array( 137 141 'title' => '<h1>W00t!</h1>', 138 ), $instance 142 ), 143 $instance 139 144 ); 140 145 $this->assertNotSame( $result, $instance ); … … 151 156 array( 152 157 'size' => 'big league', 153 ), $instance 158 ), 159 $instance 154 160 ); 155 161 $this->assertSame( $result, $instance ); … … 166 172 array( 167 173 'width' => 'wide', 168 ), $instance 174 ), 175 $instance 169 176 ); 170 177 $this->assertSame( $result, $instance ); … … 181 188 array( 182 189 'height' => 'high', 183 ), $instance 190 ), 191 $instance 184 192 ); 185 193 $this->assertSame( $result, $instance ); … … 196 204 array( 197 205 'caption' => '"><i onload="alert(\'hello\')" />', 198 ), $instance 206 ), 207 $instance 199 208 ); 200 209 $this->assertSame( 201 $result, array( 210 $result, 211 array( 202 212 'caption' => '"><i />', 203 213 ) … … 215 225 array( 216 226 'alt' => '"><i onload="alert(\'hello\')" />', 217 ), $instance 227 ), 228 $instance 218 229 ); 219 230 $this->assertSame( 220 $result, array( 231 $result, 232 array( 221 233 'alt' => '">', 222 234 ) … … 234 246 array( 235 247 'link_type' => 'interesting', 236 ), $instance 248 ), 249 $instance 237 250 ); 238 251 $this->assertSame( $result, $instance ); … … 249 262 array( 250 263 'link_url' => 'not_a_url', 251 ), $instance 264 ), 265 $instance 252 266 ); 253 267 $this->assertNotSame( $result, $instance ); … … 265 279 array( 266 280 'image_classes' => '"><i onload="alert(\'hello\')" />', 267 ), $instance 281 ), 282 $instance 268 283 ); 269 284 $this->assertSame( 270 $result, array( 285 $result, 286 array( 271 287 'image_classes' => 'i onloadalerthello', 272 288 ) … … 284 300 array( 285 301 'link_classes' => '"><i onload="alert(\'hello\')" />', 286 ), $instance 302 ), 303 $instance 287 304 ); 288 305 $this->assertSame( 289 $result, array( 306 $result, 307 array( 290 308 'link_classes' => 'i onloadalerthello', 291 309 ) … … 303 321 array( 304 322 'link_rel' => '"><i onload="alert(\'hello\')" />', 305 ), $instance 323 ), 324 $instance 306 325 ); 307 326 $this->assertSame( 308 $result, array( 327 $result, 328 array( 309 329 'link_rel' => 'i onloadalerthello', 310 330 ) … … 322 342 array( 323 343 'link_target_blank' => 'top', 324 ), $instance 344 ), 345 $instance 325 346 ); 326 347 $this->assertSame( $result, $instance ); … … 337 358 array( 338 359 'image_title' => '<h1>W00t!</h1>', 339 ), $instance 360 ), 361 $instance 340 362 ); 341 363 $this->assertNotSame( $result, $instance ); … … 345 367 array( 346 368 'imaginary_key' => 'value', 347 ), $instance 369 ), 370 $instance 348 371 ); 349 372 $this->assertSame( $result, $instance );
Note: See TracChangeset
for help on using the changeset viewer.