Changeset 38810 for trunk/tests/phpunit/tests/functions.php
- Timestamp:
- 10/18/2016 08:04:36 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r38685 r38810 881 881 $this->assertEquals( WP_MAX_MEMORY_LIMIT, $ini_limit_after ); 882 882 } 883 884 /** 885 * Tests wp_generate_uuid4(). 886 * 887 * @covers wp_generate_uuid4() 888 * @ticket 38164 889 */ 890 function test_wp_generate_uuid4() { 891 $uuids = array(); 892 for ( $i = 0; $i < 20; $i += 1 ) { 893 $uuid = wp_generate_uuid4(); 894 $this->assertRegExp( '/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/', $uuid ); 895 $uuids[] = $uuid; 896 } 897 898 $unique_uuids = array_unique( $uuids ); 899 $this->assertEquals( $uuids, $unique_uuids ); 900 } 883 901 }
Note: See TracChangeset
for help on using the changeset viewer.