diff options
Diffstat (limited to 'tests/units/FunctionTest.php')
-rw-r--r-- | tests/units/FunctionTest.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/units/FunctionTest.php b/tests/units/FunctionTest.php new file mode 100644 index 00000000..72895845 --- /dev/null +++ b/tests/units/FunctionTest.php @@ -0,0 +1,21 @@ +<?php + +require_once __DIR__.'/Base.php'; + +class FunctionTest extends Base +{ + public function testArrayColumnSum() + { + $input = array( + array( + 'my_column' => 123 + ), + array( + 'my_column' => 456.7 + ), + array() + ); + + $this->assertSame(579.7, array_column_sum($input, 'my_column')); + } +} |