public function testDecrypt() { $this->blockCipher->expects($this->at(0))->method('decrypt')->with('Encrypted 1')->will($this->returnValue('Foo')); $this->blockCipher->expects($this->at(1))->method('decrypt')->with('Encrypted 2')->will($this->returnValue('["Foo"]')); $data = array('noSecret' => 'Foo', 'secretString' => 'Encrypted 1', 'secretArray' => 'Encrypted 2'); $this->assertEquals(new PrivateStuff(), $this->createSerializer()->deserialize(PrivateStuff::class, $data)); }