Commit 0f4d49f1 authored by Marc Egger's avatar Marc Egger
Browse files

finish moving existing test classes to extension/Tests/unit and solve simple errors

parent e2e7a8c6
Pipeline #1176 passed with stage
in 1 minute and 32 seconds
......@@ -7,4 +7,6 @@
*/
// use autoloader of composer. Directories for autoload specified in composer.json -> autoload
require_once(__DIR__ . '/../vendor/autoload.php');
\ No newline at end of file
require_once(__DIR__ . '/../vendor/autoload.php');
require_once(__DIR__ . '/core/Constants.php');
\ No newline at end of file
#!/bin/bash
function help_message() {
cat <<EOF
`basename $0` -p <phpunitphar> -t <testdirectory> -m <mailto> [-h]
EOF
}
while getopts p:t:m:h name
do
case "$name" in
h)
help_message
exit 0
;;
p)
PHPUNITPHAR=$OPTARG
;;
t)
TESTPATH=$OPTARG
;;
m)
MAILTO=$OPTARG
;;
esac
done
if [ -z "$PHPUNITPHAR" -o -z "$TESTPATH" -o -z "$MAILTO" ]
then
help_message
exit 1
fi
PHPUNITOUTPUT=`php $PHPUNITPHAR "$TESTPATH/phpunit" 2>&1`
if [ $? -ne 0 ]; then
echo "$PHPUNITOUTPUT" | mailx -s 'QFQ PHPUnit Tests Failed' $MAILTO
fi
# if type phantomjs >/dev/null 2>&1
# then
# phantomjs "$TESTPATH/phantom.js"
# if [ -f /tmp/phantomjs.png ]
# then
# mailx -s 'PhantomJS freaked' -a /tmp/phantomjs.png $MAILTO && rm -f /tmp/phantomjs.png
# fi
# fi
......@@ -7,15 +7,9 @@
*/
namespace qfq;
//use qfq;
require_once(__DIR__ . '/../../core/BodytextParser.php');
require_once(__DIR__ . '/../../core/exceptions/UserFormException.php');
use PHPUnit\Framework\TestCase;
//class BodytextParserTest extends \PHPUnit_Framework_TestCase {
/**
* Class BodytextParserTest
* @package qfq
......
......@@ -3,11 +3,9 @@
* @author Carsten Rose <carsten.rose@math.uzh.ch>
*/
require_once(__DIR__ . '/AbstractDatabaseTest.php');
require_once(__DIR__ . '/../../core/database/Database.php');
require_once(__DIR__ . '/../../core/exceptions/DbException.php');
require_once(__DIR__ . '/../../core/QuickFormQuery.php');
require_once(__DIR__ . '/../../core/helper/Support.php');
namespace qfq;
require_once(__DIR__ . '/database/AbstractDatabaseTest.php');
/**
* Class BuildFormPlainTest
......@@ -446,7 +444,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
// _id: 1, name: Doe, link
$formElement['sql1'] = $this->dbArray[DB_INDEX_DEFAULT]->sql('SELECT id AS "_id", name, CONCAT("s:1|p:form&form=person&r=" , id , "|t:", name) AS "link" FROM Person ORDER BY id LIMIT 2');
$result = $build->buildSubrecord($formElement, 'name:1', '', $json);
$this->assertEquals('<table class="' . SUBRECORD_TABLE_CLASS_DEFAULT . '" ><thead><tr><th>name</th><th></th></tr></thead><tbody><tr class="record" ><td>Doe</td><td><a href="index.php?id=form&s=badcaffee1234" >Doe</a></td></tr><tr class="record" ><td>Smith</td><td><a href="index.php?id=form&s=badcaffee1234" >Smith</a></td></tr></tbody></table>', $result);
$this->assertEquals('<table class="' . SUBRECORD_TABLE_CLASS_DEFAULT . '" ><thead><tr><th>name</th><th></th></tr></thead><tbody><tr class="record" ><td>Doe</td><td><a href="../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&s=badcaffee1234" >Doe</a></td></tr><tr class="record" ><td>Smith</td><td><a href="../../../../../../../../../scratch/software/typo3/typo3_src-8.7.20/index.php?id=form&s=badcaffee1234" >Smith</a></td></tr></tbody></table>', $result);
}
/**
......@@ -529,11 +527,11 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
// Use always the latest (production) FormEditor: played during QuickFormQuery()
$this->dbArray[DB_INDEX_DEFAULT]->sql("DROP TABLE IF EXISTS `Form`");
$this->dbArray[DB_INDEX_DEFAULT]->sql("DROP TABLE IF EXISTS `FormElement`");
$this->executeSQLFile(__DIR__ . '/../../sql/formEditor.sql', true);
$this->executeSQLFile(__DIR__ . '/../../../Source/sql/formEditor.sql', true);
$this->store->unsetStore(STORE_ADDITIONAL_FORM_ELEMENTS);
$this->executeSQLFile(__DIR__ . '/fixtures/Generic.sql', true);
$this->executeSQLFile(__DIR__ . '/fixtures/TestForm.sql', true);
$this->executeSQLFile(__DIR__ . '/database/fixtures/Generic.sql', true);
$this->executeSQLFile(__DIR__ . '/database/fixtures/TestForm.sql', true);
// Defaults
$this->store->setVar('name', 'varchar(255)', STORE_TABLE_COLUMN_TYPES, true);
......
......@@ -8,14 +8,13 @@
namespace qfq;
require_once(__DIR__ . '/AbstractDatabaseTest.php');
require_once(__DIR__ . '/../../core/Delete.php');
require_once(__DIR__ . '/database/AbstractDatabaseTest.php');
/**
* Class DeleteTest
* @package qfq
*/
class DeleteTest extends \AbstractDatabaseTest {
class DeleteTest extends AbstractDatabaseTest {
/**
* @expectedException \qfq\CodeException
......@@ -107,7 +106,7 @@ class DeleteTest extends \AbstractDatabaseTest {
$this->store->setVar('form', 'TestFormName', STORE_TYPO3);
$this->store->setVar(SYSTEM_SITE_PATH, '/tmp', STORE_SYSTEM, true);
$this->executeSQLFile(__DIR__ . '/fixtures/Generic.sql', true);
$this->executeSQLFile(__DIR__ . '/database/fixtures/Generic.sql', true);
}
}
......@@ -8,18 +8,13 @@
namespace qfq;
use qfq;
require_once(__DIR__ . '/AbstractDatabaseTest.php');
require_once(__DIR__ . '/../../core/Evaluate.php');
require_once(__DIR__ . '/../../core/database/Database.php');
require_once(__DIR__ . '/../../core/store/Store.php');
require_once(__DIR__ . '/database/AbstractDatabaseTest.php');
/**
* Class EvaluateTest
* @package qfq
*/
class EvaluateTest extends \AbstractDatabaseTest {
class EvaluateTest extends AbstractDatabaseTest {
public function testVars() {
$eval = new \qfq\Evaluate($this->store, $this->dbArray[DB_INDEX_DEFAULT]);
......@@ -389,7 +384,7 @@ class EvaluateTest extends \AbstractDatabaseTest {
parent::setUp();
$this->store->setVar('form', 'TestFormName', STORE_TYPO3);
$this->executeSQLFile(__DIR__ . '/fixtures/Generic.sql', true);
$this->executeSQLFile(__DIR__ . '/database/fixtures/Generic.sql', true);
}
}
......@@ -7,16 +7,10 @@
* Time: 7:11 PM
*/
require_once(__DIR__ . '/../../core/Constants.php');
require_once(__DIR__ . '/../../core/QuickFormQuery.php');
require_once(__DIR__ . '/../../core/store/Store.php');
require_once(__DIR__ . '/../../core/store/Sip.php');
namespace qfq;
use PHPUnit\Framework\TestCase;
//class QuickFormQueryTest extends \PHPUnit_Framework_TestCase {
/**
* Class QuickFormQueryTest
*/
......@@ -26,7 +20,7 @@ class QuickFormQueryTest extends TestCase {
public function testProcess() {
$form = new qfq\QuickFormQuery(['bodytext' => "\n; some comment\n" . TYPO3_FORM . "=testformnameDoNotChange\n"]);
// $form = new QuickFormQuery(['bodytext' => "\n; some comment\n" . TYPO3_FORM . "=testformnameDoNotChange\n"]);
// $this->assertEquals("", $form->process());
}
//
......@@ -54,28 +48,28 @@ class QuickFormQueryTest extends TestCase {
// <empty> bodytext
$t3data[T3DATA_BODYTEXT] = "\n \n \n";
$t3data[T3DATA_UID] = "123";
$qfq = new qfq\QuickFormQuery($t3data, true);
$qfq = new QuickFormQuery($t3data, true);
$result = $qfq->getFormName(FORM_LOAD, $foundInStore);
$this->assertEquals('', $result);
// form=
$t3data[T3DATA_BODYTEXT] = "\n \n" . TYPO3_FORM . "=\n";
$t3data[T3DATA_UID] = "123";
$qfq = new qfq\QuickFormQuery($t3data, true);
$qfq = new QuickFormQuery($t3data, true);
$result = $qfq->getFormName(FORM_LOAD, $foundInStore);
$this->assertEquals('', $result);
// form=<formname>
$t3data[T3DATA_BODYTEXT] = "\n \n" . TYPO3_FORM . "=myForm\n";
$t3data[T3DATA_UID] = "123";
$qfq = new qfq\QuickFormQuery($t3data, true);
$qfq = new QuickFormQuery($t3data, true);
$result = $qfq->getFormName(FORM_LOAD, $foundInStore);
$this->assertEquals('myForm', $result);
// form={{SELECT 'nextForm'}}
$t3data[T3DATA_BODYTEXT] = "\n \n" . TYPO3_FORM . "={{SELECT 'nextForm'}}\n";
$t3data[T3DATA_UID] = "123";
$qfq = new qfq\QuickFormQuery($t3data, true);
$qfq = new QuickFormQuery($t3data, true);
$result = $qfq->getFormName(FORM_LOAD, $foundInStore);
$this->assertEquals('nextForm', $result);
......@@ -83,18 +77,18 @@ class QuickFormQueryTest extends TestCase {
$t3data[T3DATA_BODYTEXT] = "\n \n" . TYPO3_FORM . "={{form:C:alnumx}}\n";
$t3data[T3DATA_UID] = "123";
$_SERVER['form'] = 'formNameViaGet';
$qfq = new qfq\QuickFormQuery($t3data, true);
$qfq = new QuickFormQuery($t3data, true);
$result = $qfq->getFormName(FORM_LOAD, $foundInStore);
$this->assertEquals('formNameViaGet', $result);
// form={{form}}
// $sip = new qfq\Sip('fakesessionname', true);
// $sip = new Sip('fakesessionname', true);
// $sip->sipUniqId('badcaffee1234');
// $t3data[T3DATA_BODYTEXT] = "\n \n" . TYPO3_FORM . "={{form}}\n";
// $t3data[T3DATA_UID] = "123";
// $_SERVER[CLIENT_SIP]='badcaffee1234';
// $dummy = $sip->queryStringToSip("http://example.com/index.php?id=input&r=1&form=person", RETURN_URL);
// $qfq = new qfq\QuickFormQuery($t3data, true);
// $qfq = new QuickFormQuery($t3data, true);
// $result = $qfq->getFormName(FORM_LOAD, $foundInStore);
// $this->assertEquals('person', $result);
......
......@@ -6,14 +6,9 @@
* Time: 8:47 AM
*/
//namespace qfq;
//
//use qfq\Save;
//use qfq\Database;
namespace qfq;
require_once(__DIR__ . '/../../core/Save.php');
//require_once(__DIR__ . '/../../qfq/Database.php');
require_once(__DIR__ . '/AbstractDatabaseTest.php');
require_once(__DIR__ . '/database/AbstractDatabaseTest.php');
/**
* Class SaveTest
......@@ -22,8 +17,8 @@ class SaveTest extends AbstractDatabaseTest {
public function testUpdateRecord() {
$save = new qfq\Save([F_DB_INDEX => DB_INDEX_DEFAULT], array(), array(), array());
// $db = new qfq\Database();
$save = new Save([F_DB_INDEX => DB_INDEX_DEFAULT], array(), array(), array());
// $db = new Database();
$values = ['name' => 'Doe', 'firstName' => 'John'];
$id = $save->insertRecord('Person', $values);
......@@ -34,14 +29,14 @@ class SaveTest extends AbstractDatabaseTest {
$sql = "SELECT name, firstName FROM Person WHERE id = ? ";
$result = $this->dbArray[DB_INDEX_DEFAULT]->sql($sql, ROW_REGULAR, [$id]);
$this->assertEquals($values, $result[0], array());
$this->assertEquals($values, $result[0]);
}
public function testInsertRecord() {
$save = new qfq\Save([F_DB_INDEX => DB_INDEX_DEFAULT], array(), array(), array());
// $db = new qfq\Database();
$save = new Save([F_DB_INDEX => DB_INDEX_DEFAULT], array(), array(), array());
// $db = new Database();
$values = ['name' => 'Doe', 'firstName' => 'John'];
$id = $save->insertRecord('Person', $values);
......@@ -60,7 +55,7 @@ class SaveTest extends AbstractDatabaseTest {
protected function setUp() {
parent::setUp();
$this->executeSQLFile(__DIR__ . '/fixtures/Generic.sql', true);
$this->executeSQLFile(__DIR__ . '/database/fixtures/Generic.sql', true);
}
}
......@@ -5,8 +5,6 @@
namespace qfq;
require_once(__DIR__ . '/../../../../Source/bootstrap.php');
use PHPUnit\Framework\TestCase;
/**
......
......@@ -6,16 +6,9 @@
* Time: 8:47 AM
*/
//namespace qfq;
//
//use PHPUnit\Framework\TestCase;
//use qfq;
namespace qfq;
require_once(__DIR__ . '/AbstractDatabaseTest.php');
require_once(__DIR__ . '/../../core/form/Dirty.php');
require_once(__DIR__ . '/../../core/store/Sip.php');
require_once(__DIR__ . '/../../core/store/Session.php');
require_once(__DIR__ . '/../../core/database/Database.php');
require_once(__DIR__ . '/../database/AbstractDatabaseTest.php');
/*
* Open to check
......@@ -75,7 +68,7 @@ require_once(__DIR__ . '/../../core/database/Database.php');
/**
* Class DirtyTest
*/
class DirtyTest extends \AbstractDatabaseTest {
class DirtyTest extends AbstractDatabaseTest {
/*
* @var \qfq\Sip
......@@ -1042,9 +1035,9 @@ class DirtyTest extends \AbstractDatabaseTest {
parent::setUp();
$this->executeSQLFile(__DIR__ . '/fixtures/TestFormEditor.sql', true);
$this->executeSQLFile(__DIR__ . '/fixtures/Generic.sql', true);
$this->executeSQLFile(__DIR__ . '/fixtures/TestDirty.sql', true);
$this->executeSQLFile(__DIR__ . '/../database/fixtures/TestFormEditor.sql', true);
$this->executeSQLFile(__DIR__ . '/../database/fixtures/Generic.sql', true);
$this->executeSQLFile(__DIR__ . '/../database/fixtures/TestDirty.sql', true);
$this->sip = new \qfq\Sip(true);
$this->sip->sipUniqId('badcaffee1234');
......
......@@ -8,14 +8,13 @@
namespace qfq;
require_once(__DIR__ . '/AbstractDatabaseTest.php');
require_once(__DIR__ . '/../../core/form/FormAction.php');
require_once(__DIR__ . '/../database/AbstractDatabaseTest.php');
/**
* Class FormActionTest
* @package qfq
*/
class FormActionTest extends \AbstractDatabaseTest {
class FormActionTest extends AbstractDatabaseTest {
public function testBeforeLoad() {
$formSpec[F_TABLE_NAME] = 'Person';
......@@ -316,7 +315,7 @@ class FormActionTest extends \AbstractDatabaseTest {
parent::setUp();
$this->store->setVar('form', 'TestFormName', STORE_TYPO3);
$this->executeSQLFile(__DIR__ . '/fixtures/Generic.sql', true);
$this->executeSQLFile(__DIR__ . '/../database/fixtures/Generic.sql', true);
}
......
......@@ -8,8 +8,6 @@
namespace qfq;
require_once(__DIR__ . '/../../../../Source/bootstrap.php');
use PHPUnit\Framework\TestCase;
/**
......
......@@ -9,13 +9,8 @@
namespace qfq;
require_once(__DIR__ . '/../../core/helper/HelperFormElement.php');
require_once(__DIR__ . '/../../core/Constants.php');
use PHPUnit\Framework\TestCase;
//class HelperFormElementTest extends \PHPUnit_Framework_TestCase {
/**
* Class HelperFormElementTest
* @package qfq
......
......@@ -5,17 +5,8 @@
namespace qfq;
use qfq\KeyValueStringParser;
require_once(__DIR__ . '/../../core/Constants.php');
require_once(__DIR__ . '/../../core/helper/KeyValueStringParser.php');
use PHPUnit\Framework\TestCase;
//class KeyValueStringParserTest extends \PHPUnit_Framework_TestCase {
/**
* Class KeyValueStringParserTest
* @package qfq
......@@ -24,7 +15,7 @@ class KeyValueStringParserTest extends TestCase {
public function testSingleKeyValuePair() {
$actual = keyValueStringParser::parse("key:value");
$actual = KeyValueStringParser::parse("key:value");
$this->assertCount(1, $actual);
$this->assertArrayHasKey('key', $actual);
......@@ -32,14 +23,14 @@ class KeyValueStringParserTest extends TestCase {
}
public function testKeyWithoutValue() {
$actual = keyValueStringParser::parse("keywithoutvalue");
$actual = KeyValueStringParser::parse("keywithoutvalue");
$this->assertCount(1, $actual);
$this->assertArrayHasKey('keywithoutvalue', $actual);
$this->assertSame("", $actual['keywithoutvalue']);
}
public function testGOODNAMEHERE() {
$actual = keyValueStringParser::parse(",,");
$actual = KeyValueStringParser::parse(",,");
$this->assertCount(0, $actual);
}
......@@ -48,11 +39,11 @@ class KeyValueStringParserTest extends TestCase {
* @expectedException \qfq\UserFormException
*/
public function testNoKey() {
keyValueStringParser::parse(":value,key:value");
KeyValueStringParser::parse(":value,key:value");
}
public function testNoValue() {
$actual = keyValueStringParser::parse("key1:,key2:value2");
$actual = KeyValueStringParser::parse("key1:,key2:value2");
$this->assertCount(2, $actual);
$this->assertArrayHasKey('key1', $actual);
$this->assertArrayHasKey('key2', $actual);
......@@ -61,13 +52,13 @@ class KeyValueStringParserTest extends TestCase {
}
public function testEmptyKeyValuePairString() {
$actual = keyValueStringParser::parse("");
$actual = KeyValueStringParser::parse("");
$this->assertCount(0, $actual);
}
public function testMultipleKeyValuePairs() {
$actual = keyValueStringParser::parse("key1:value1,key2:value2");
$actual = KeyValueStringParser::parse("key1:value1,key2:value2");
$this->assertCount(2, $actual);
$this->assertArrayHasKey('key1', $actual);
......@@ -77,7 +68,7 @@ class KeyValueStringParserTest extends TestCase {
}
public function testKeyValueSeparatorInValue() {
$actual = keyValueStringParser::parse("key1:val:ue1,key2:value2");
$actual = KeyValueStringParser::parse("key1:val:ue1,key2:value2");
$this->assertCount(2, $actual);
$this->assertArrayHasKey('key1', $actual);
......@@ -87,7 +78,7 @@ class KeyValueStringParserTest extends TestCase {
}
public function testWhiteSpaceHandling() {
$actual = keyValueStringParser::parse(" key1 : val:ue1 , key2 : value2 ");
$actual = KeyValueStringParser::parse(" key1 : val:ue1 , key2 : value2 ");
$this->assertCount(2, $actual);
$this->assertArrayHasKey('key1', $actual);
......@@ -97,7 +88,7 @@ class KeyValueStringParserTest extends TestCase {
}
public function testSourroundingQuotes() {
$actual = keyValueStringParser::parse("key1:\" val:ue1 \", key2:' value2 ', key3:\"value3', key4:''");
$actual = KeyValueStringParser::parse("key1:\" val:ue1 \", key2:' value2 ', key3:\"value3', key4:''");
$expected = [
'key1' => ' val:ue1 ',
......@@ -109,7 +100,7 @@ class KeyValueStringParserTest extends TestCase {
}
public function testComments() {
$actual = keyValueStringParser::parse(" key1 : val:ue1 , # key2 : value2 , ; : broken key value in comment, key3 : valid ");
$actual = KeyValueStringParser::parse(" key1 : val:ue1 , # key2 : value2 , ; : broken key value in comment, key3 : valid ");
$expected = [
'key1' => 'val:ue1',
......@@ -119,8 +110,8 @@ class KeyValueStringParserTest extends TestCase {
}
public function testUnparse() {
$array = keyValueStringParser::parse("key1:\" val:ue1 \", key2:' value2 ', key3:\"value3'");
$actual = keyValueStringParser::unparse($array);
$array = KeyValueStringParser::parse("key1:\" val:ue1 \", key2:' value2 ', key3:\"value3'");
$actual = KeyValueStringParser::unparse($array);
$expected = "key1:\" val:ue1 \",key2:\" value2 \",key3:\"value3'";
$this->assertSame($expected, $actual);
......@@ -129,7 +120,7 @@ class KeyValueStringParserTest extends TestCase {
public function testKeyValuePairCR() {
$actual = keyValueStringParser::parse("key1=value1\nkey2=value2", "=", "\n");
$actual = KeyValueStringParser::parse("key1=value1\nkey2=value2", "=", "\n");
$this->assertCount(2, $actual);
$this->assertArrayHasKey('key1', $actual);
......@@ -139,7 +130,7 @@ class KeyValueStringParserTest extends TestCase {
}
public function testParseKeyValueSingle() {
$actual = keyValueStringParser::parse('value1,value2', ':', ',', KVP_IF_VALUE_EMPTY_COPY_KEY);
$actual = KeyValueStringParser::parse('value1,value2', ':', ',', KVP_IF_VALUE_EMPTY_COPY_KEY);
$expected = [
'value1' => 'value1',
'value2' => 'value2',
......@@ -147,7 +138,7 @@ class KeyValueStringParserTest extends TestCase {
$this->assertEquals($expected, $actual);
$this->assertCount(2, $actual);
$actual = keyValueStringParser::parse('key1:value1,key2:value2', ':', ',', KVP_IF_VALUE_EMPTY_COPY_KEY);
$actual = KeyValueStringParser::parse('key1:value1,key2:value2', ':', ',', KVP_IF_VALUE_EMPTY_COPY_KEY);
$expected = [
'key1' => 'value1',
'key2' => 'value2',
......@@ -155,7 +146,7 @@ class KeyValueStringParserTest extends TestCase {
$this->assertEquals($expected, $actual);
$this->assertCount(2, $actual);
$actual = keyValueStringParser::parse('key1:value1,key2:value2', ':', ',', KVP_VALUE_GIVEN);
$actual = KeyValueStringParser::parse('key1:value1,key2:value2', ':', ',', KVP_VALUE_GIVEN);
$expected = [
'key1' => 'value1',
'key2' => 'value2',
......@@ -163,7 +154,7 @@ class KeyValueStringParserTest extends TestCase {
$this->assertEquals($expected, $actual);
$this->assertCount(2, $actual);
$actual = keyValueStringParser::parse('value1,value2', ':', ',', KVP_VALUE_GIVEN);
$actual = KeyValueStringParser::parse('value1,value2', ':', ',', KVP_VALUE_GIVEN);
$expected = [
'value1' => '',
'value2' => '',
......@@ -173,89 +164,89 @@ class KeyValueStringParserTest extends TestCase {
}
public function testParseDefaults() {
$actual = keyValueStringParser::parse("key1=value1,key2=value2");
$expected = keyValueStringParser::parse("key1=value1,key2=value2", ":", ",");
$actual = KeyValueStringParser::parse("key1=value1,key2=value2");
$expected = KeyValueStringParser::parse("key1=value1,key2=value2", ":", ",");
$this->assertEquals($expected, $actual);
$this->assertCount(2, $actual);
}
public function testExplodeContent() {
$actual = keyValueStringParser::explodeWrapped('', '');
$actual = KeyValueStringParser::explodeWrapped('', '');
$this->assertEquals(false, $actual);
$actual = keyValueStringParser::explodeWrapped(':', '');
$actual = KeyValueStringParser::explodeWrapped(':', '');
$this->assertEquals([''], $actual);
$actual = keyValueStringParser::explodeWrapped(':', 'a,b,c');
$actual = KeyValueStringParser::explodeWrapped(':', 'a,b,c');
$this->assertEquals(['a,b,c'], $actual);
$actual = keyValueStringParser::explodeWrapped(',', 'a,b,c');
$actual = KeyValueStringParser::explodeWrapped(',', 'a,b,c');
$this->assertEquals(['a', 'b', 'c'], $actual);
$actual = keyValueStringParser::explodeWrapped(',', ' a,b,c');
$actual = KeyValueStringParser::explodeWrapped(',', ' a,b,c');
$this->assertEquals([' a', 'b', 'c'], $actual);
$actual = keyValueStringParser::explodeWrapped(',', 'a ,b,c');
$actual = KeyValueStringParser::explodeWrapped(',', 'a ,b,c');