1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 00:54:49 +02:00

Fix for multi-dimensional field saving.

This commit is contained in:
Cameron
2021-02-02 16:06:17 -08:00
parent a9ebe4b4a0
commit d1f997ee2c
4 changed files with 232 additions and 69 deletions

View File

@@ -33,6 +33,38 @@
$this->tp->init();
}
public function testToRoute()
{
$posted = array(
'myfield' => array(
'computer' => array(
'apple' => array('imac' => '1')
),
'os' => array(
'microsoft' => array('windows' => 'xp')
)
),
'myfield2' => array(
'house' => array('car' => 'red')
),
'myfield3' => 'string',
);
$expected = array (
'myfield/computer/apple/imac' => 'myfield',
'myfield/os/microsoft/windows' => 'myfield',
'myfield2/house/car' => 'myfield2',
'myfield3' => 'myfield3',
);
$result = $this->tp->toRoute($posted);
$this->assertSame($expected, $result);
}
public function testStripBlockTags()
{
$tests = array(