From ddb6c308da5000b354f44ee509cff788d111cb48 Mon Sep 17 00:00:00 2001
From: Michael Grosse <grosse@cosmocode.de>
Date: Tue, 17 Jan 2017 13:00:50 +0100
Subject: [PATCH] Add test to verify that no error occurs

Without the change in issue #1801, or commit
1b26d16d86d6a898466211861adc1dff2286da2b respectively, this adjusted
test would throw an error since it would attempt to use another array as
an array-key.

The fact that the test passes without error means that the bug is fixed.
---
 _test/tests/inc/form/dropdownelement.test.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/_test/tests/inc/form/dropdownelement.test.php b/_test/tests/inc/form/dropdownelement.test.php
index b3366ac1e..3aa0f16e4 100644
--- a/_test/tests/inc/form/dropdownelement.test.php
+++ b/_test/tests/inc/form/dropdownelement.test.php
@@ -58,7 +58,10 @@ class form_dropdownelement_test extends DokuWikiTest {
                     'data-foo' => 'bar'
                 )
             ),
-            'second'
+            'second',
+            '3' => array(
+                'label' => 'the label of the complex third option',
+            )
         );
 
         $form->addDropdown('foo', $options, 'label text');
@@ -70,7 +73,7 @@ class form_dropdownelement_test extends DokuWikiTest {
         $this->assertTrue($select->length == 1);
 
         $options = $pq->find('option');
-        $this->assertTrue($options->length == 2);
+        $this->assertEquals(3, $options->length);
 
         $option = $pq->find('option#theID');
         $this->assertEquals(1, $option->length);
-- 
GitLab