Bug #11659

VariableFrontend tests fail if igbinary php module is active

Added by Christian Kuhn over 4 years ago. Updated about 4 years ago.

Status:Closed Start date:2010-12-22
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

0%

Category:Cache
Target version:TYPO3 Flow Base Distribution - 1.0 beta 1
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

All tests which use a direct serialize() of a given input fail, if igbinary php module is running.

This is because the tests expect that the returned strings are serialized() with the standard php method, but they are in fact serialized by igbinary_serialize().

Todo: Fix all tests in VariableFrontend which use serialize() and take care of igbinary.

11659_test.diff Magnifier (1.6 kB) Christian Kuhn, 2011-01-03 22:29

History

#1 Updated by Christian Kuhn over 4 years ago

I'm confused, maybe someone could help me out.

I've backported the igbinary serializer patch from FLOW3 to TYPO3v4, which leads to failing tests in v4 for all tests of the variableFrontend which use serialize() to compare data which is issued to a backend with the expected value. I'd expect those tests to fail in FLOW3 as well, but they don't.

I've taken the setPassesSerializedStringToBackend() as a testcase to dig into this.

Applied attached patch. It just does a print_r() of the serialize of the variable within the test, and the igbinary_serialize() in the variable frontend immediately before the call of backend->set()

Output (first: testcase out, second: variableFrontend out):
s:15:"Just some value";
Just some value

So, the output is different, thus I'd expect the $this->equalTo(serialize($theString)) expectation of the mockBackend in the test to fail ... but it doesn't in FLOW3 (it does in TYPO3v4).

So ... what is wrong here? I don't get it ... Why does this test not fail, even if the two values (actual and expected) are different?

#2 Updated by Karsten Dambekalns over 4 years ago

  • Status changed from New to Closed
  • Assigned To set to Karsten Dambekalns
  • Target version set to 1.0 beta 1

Because the use if igbinary is subject to a flag that is set in initializeObject(), but that function is never called in the tests. Thus igbinary is never used, except for the tests setUsesIgBinarySerializeIfAvailable() and getUsesIgBinarySerializeIfAvailable().

Also available in: Atom PDF