Changeset 45013 for branches/4.0/tests/phpunit/tests/functions.php
- Timestamp:
- 03/26/2019 12:45:57 AM (6 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
- Property svn:mergeinfo changed
/trunk merged: 29860,29869,29954,30160,30530
- Property svn:mergeinfo changed
-
branches/4.0/tests/phpunit/tests/functions.php
r29342 r45013 130 130 $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\fg.png' ), 'Double slashed not removed' ); 131 131 $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\\fg.png' ), 'Tripple slashed not removed' ); 132 }133 134 /**135 * @ticket 9930136 */137 function test_is_serialized() {138 $cases = array(139 serialize(null),140 serialize(true),141 serialize(false),142 serialize(-25),143 serialize(25),144 serialize(1.1),145 serialize(2.1E+200),146 serialize('this string will be serialized'),147 serialize("a\nb"),148 serialize(array()),149 serialize(array(1,1,2,3,5,8,13)),150 serialize( (object)array('test' => true, '3', 4) )151 );152 foreach ( $cases as $case )153 $this->assertTrue( is_serialized($case), "Serialized data: $case" );154 155 $not_serialized = array(156 'a string',157 'garbage:a:0:garbage;',158 'b:4;',159 's:4:test;'160 );161 foreach ( $not_serialized as $case )162 $this->assertFalse( is_serialized($case), "Test data: $case" );163 132 } 164 133
Note: See TracChangeset
for help on using the changeset viewer.