Bug #11659

VariableFrontend tests fail if igbinary php module is active

Added by Christian Kuhn almost 11 years ago. Updated over 10 years ago.

Should have
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Has patch:


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 (1.63 KB) 11659_test.diff Christian Kuhn, 2011-01-03 22:29

Updated by Christian Kuhn almost 11 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?


Updated by Karsten Dambekalns over 10 years ago

  • Status changed from New to Closed
  • Assignee 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