Make WordPress Core

Ticket #35952: functions.diff

File functions.diff, 869 bytes (added by borgesbruno, 9 years ago)

35952.patch

  • functions.php

     
    196196                        $this->assertFalse( is_serialized($case), "Test data: $case" );
    197197        }
    198198
     199
     200        public function serialize_string_provider()
     201        {
     202                return array(
     203                        array(0, false),
     204                        array('1as', false),
     205                        array('1asd:ddd', false),
     206                        array('a:dadsa:aaaa', false),
     207                        array('a:da:dsa:aaaa;', false),
     208                        array('s:30:"not serialized yet;', false),
     209                        array('s:30:"serialized string";', true)
     210                );
     211        }
     212       
    199213        /**
     214         * @ticket #35952
     215         * @dataProvider serialize_string_provider
     216         */
     217        public function test_if_is_serialized_string($param, $result)
     218        {
     219                $this->assertEquals(is_serialized_string($param), $result);
     220        }
     221
     222        /**
    200223         * @ticket 17375
    201224         */
    202225        function test_no_new_serializable_types() {