/** * Test the Joomla\Input\Input::serialize method. * * @return void * * @covers Joomla\Input\Input::serialize * @since 1.0 */ public function testSerialize() { // Load the inputs so that the static $loaded is set to true. TestHelper::invoke($this->instance, 'loadAllInputs'); // Adjust the values so they are easier to handle. TestHelper::setValue($this->instance, 'inputs', array('server' => 'remove', 'env' => 'remove', 'request' => 'keep')); TestHelper::setValue($this->instance, 'options', 'options'); TestHelper::setValue($this->instance, 'data', 'data'); $this->assertThat($this->instance->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";}}')); }