Changeset 39265 for trunk/tests/phpunit/tests/media.php
- Timestamp:
- 11/16/2016 01:14:44 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r38858 r39265 293 293 // now some values around 294 294 $hr = wp_convert_bytes_to_hr( $tb + $tb / 2 + $mb ); 295 $this->assert True( abs( 1.50000095367 - (float) str_replace( ',', '.', $hr ) ) <0.0001 );295 $this->assertEquals( 1.50000095367, (float) str_replace( ',', '.', $hr ), 0.0001 ); 296 296 297 297 $hr = wp_convert_bytes_to_hr( $tb - $mb - $kb ); 298 $this->assert True( abs( 1023.99902248 - (float) str_replace( ',', '.', $hr ) ) <0.0001 );298 $this->assertEquals( 1023.99902248, (float) str_replace( ',', '.', $hr ), 0.0001 ); 299 299 300 300 $hr = wp_convert_bytes_to_hr( $gb + $gb / 2 + $mb ); 301 $this->assert True( abs( 1.5009765625 - (float) str_replace( ',', '.', $hr ) ) <0.0001 );301 $this->assertEquals( 1.5009765625, (float) str_replace( ',', '.', $hr ), 0.0001 ); 302 302 303 303 $hr = wp_convert_bytes_to_hr( $gb - $mb - $kb ); 304 $this->assert True( abs( 1022.99902344 - (float) str_replace( ',', '.', $hr ) ) <0.0001 );304 $this->assertEquals( 1022.99902344, (float) str_replace( ',', '.', $hr ), 0.0001 ); 305 305 306 306 // edge
Note: See TracChangeset
for help on using the changeset viewer.