Remove misleading test in SerializationTestTrain::validateObjectEquality()
commitea4bedee9dc75b5e03f8bcb86de00f4ef12babd1
authorC. Scott Ananian <cscott@cscott.net>
Wed, 30 Mar 2022 17:08:51 +0000 (30 13:08 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Thu, 31 Mar 2022 13:50:51 +0000 (31 09:50 -0400)
tree40d8a4298f9405bc7a37e93fc5e5753cb3fd899a
parented6efd2d0f73f62f99c82b0addac3fac32ef75ff
Remove misleading test in SerializationTestTrain::validateObjectEquality()

The initial object comparison using `==` compares all the property values
using `==` as well.  This causes (for example) the string "1" to compare
as equal to the number `1`, the empty string `""` to compare as equal
to the number `0` and other surprising things.

It appears that this comparison was done at an attempt at performance
optimization, but that has little place in a test suite.  Use the full
recursive strict comparison instead.

This requires updating one ParserCache test case which was apparently
created incorrectly (or not properly updated) and relied on the
previous behavior (numbers comparing as equal to strings) to pass.

Change-Id: Ife0e9ccc7be0f4933975bb326203693bc15a9658
tests/phpunit/data/ParserCache/1.36-ParserOutput-withMetadata.serialized
tests/phpunit/includes/libs/serialization/SerializationTestTrait.php