diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-11-27 15:44:45 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-11-27 15:44:45 -0500 |
commit | d8b0423d152ca27682b001f2c4d386d9c5dd361e (patch) | |
tree | 8b4919d5296b857bcf74e81c8cc06729ddfce5e5 /tests/units/FunctionTest.php | |
parent | 04ff67e26b880dde8bfb6462f312cf434457cd46 (diff) |
Add suggest menu for user mentions in text editor
Diffstat (limited to 'tests/units/FunctionTest.php')
-rw-r--r-- | tests/units/FunctionTest.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/units/FunctionTest.php b/tests/units/FunctionTest.php index 1c5f971d..0709f1fb 100644 --- a/tests/units/FunctionTest.php +++ b/tests/units/FunctionTest.php @@ -59,6 +59,38 @@ class FunctionTest extends Base $this->assertSame($expected, array_column_index($input, 'k1')); } + public function testArrayColumnIndexUnique() + { + $input = array( + array( + 'k1' => 11, + 'k2' => 22, + ), + array( + 'k1' => 11, + 'k2' => 55, + ), + array( + 'k1' => 33, + 'k2' => 44, + ), + array() + ); + + $expected = array( + 11 => array( + 'k1' => 11, + 'k2' => 22, + ), + 33 => array( + 'k1' => 33, + 'k2' => 44, + ) + ); + + $this->assertSame($expected, array_column_index_unique($input, 'k1')); + } + public function testArrayMergeRelation() { $relations = array( |