'', 'value2' => 'this is a test', 'value3' => array(), 'value4' => array('Test1', 'Test2'), 'value5' => 0, 'value6' => 1 ); $values = ConfigForm::transformEmptyValuesToNull($values); $this->assertNull( $values['value1'], 'ConfigForm::transformEmptyValuesToNull does not handle empty strings correctly' ); $this->assertEquals( 'this is a test', $values['value2'], 'ConfigForm::transformEmptyValuesToNull does not handle strings correctly' ); $this->assertNull( $values['value3'], 'ConfigForm::transformEmptyValuesToNull does not handle empty arrays correctly' ); $this->assertEquals( 'Test1', $values['value4'][0], 'ConfigForm::transformEmptyValuesToNull does not handle arrays correctly' ); $this->assertEquals( 0, $values['value5'], 'ConfigForm::transformEmptyValuesToNull does not handle zeros correctly' ); $this->assertEquals( 1, $values['value6'], 'ConfigForm::transformEmptyValuesToNull does not handle numbers correctly' ); } }