/** * Test the JInput::serialize method. * * @return void * * @since 12.1 */ public function testSerialize() { // Load the inputs so that the static $loaded is set to true. TestReflection::invoke($this->class, 'loadAllInputs'); // Adjust the values so they are easier to handle. TestReflection::setValue($this->class, 'inputs', array('server' => 'remove', 'env' => 'remove', 'request' => 'keep')); TestReflection::setValue($this->class, 'options', 'options'); TestReflection::setValue($this->class, 'data', 'data'); $this->assertThat($this->class->serialize(), $this->equalTo('a:3:{i:0;s:7:"options";i:1;s:4:"data";i:2;a:1:{s:7:"request";s:4:"keep";}}')); }