예제 #1
0
 public function testFlatten()
 {
     $this->assertEmpty(ArrayUtils::flatten($this->_getArrayPreset('empty_array')));
     $this->assertEquals(ArrayUtils::flatten($this->_getArrayPreset('abcd')), $this->_getArrayPreset('abcd'));
     $flatCollection = array(1, 'lorem', 5, '2013.07.08', 2, 'ipsum', 3, '2013.07.07', 5, 'dolor', 1, '2012.07.08', 6, 'sit', 3, '2013.12.08', 9, 'amet', 5, '2013.10.14');
     $this->assertEquals(ArrayUtils::flatten($this->_getArrayPreset('2D_collection_5')), $flatCollection);
     $this->assertEquals(ArrayUtils::flatten($this->_getArrayPreset('2D_collection_5_named')), $flatCollection);
 }