You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
769 B
35 lines
769 B
4 months ago
|
<?php
|
||
|
|
||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation;
|
||
|
|
||
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
class ArrayTest extends TestCase
|
||
|
{
|
||
|
public function testMultiDimensionalArrayIsFlattened(): void
|
||
|
{
|
||
|
$array = [
|
||
|
0 => [
|
||
|
0 => [
|
||
|
32 => [
|
||
|
'B' => 'PHP',
|
||
|
],
|
||
|
],
|
||
|
],
|
||
|
1 => [
|
||
|
0 => [
|
||
|
32 => [
|
||
|
'C' => 'Spreadsheet',
|
||
|
],
|
||
|
],
|
||
|
],
|
||
|
];
|
||
|
|
||
|
$values = Functions::flattenArray($array);
|
||
|
|
||
|
self::assertIsNotArray($values[0]);
|
||
|
self::assertIsNotArray($values[1]);
|
||
|
}
|
||
|
}
|