From 7aef782aa87cdb7895f35990295ca6729154f509 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 28 May 2015 05:22:14 +0000 Subject: [PATCH] Add unit test asserting that serializable objects will never pass is_serialized(). see #17375. git-svn-id: https://develop.svn.wordpress.org/trunk@32631 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/phpunit/tests/functions.php b/tests/phpunit/tests/functions.php index 4d3a4bbdd5..528e8f1e82 100644 --- a/tests/phpunit/tests/functions.php +++ b/tests/phpunit/tests/functions.php @@ -172,6 +172,13 @@ class Tests_Functions extends WP_UnitTestCase { $this->assertFalse( is_serialized($case), "Test data: $case" ); } + /** + * @ticket 17375 + */ + function test_no_new_serializable_types() { + $this->assertFalse( is_serialized( 'C:16:"Serialized_Class":6:{a:0:{}}' ) ); + } + /** * @group add_query_arg */