예제 #1
0
파일: ArrTest.php 프로젝트: fuelphp/common
 /**
  * @covers Fuel\Common\Arr::prepend
  * @group Common
  */
 public function testPrepend()
 {
     $input = array('one' => 1, 'two' => 2, 'three' => 3);
     $expected = array('zero' => 0, 'one' => 1, 'two' => 2, 'three' => 3);
     Arr::prepend($input, 'zero', 0);
     $this->assertEquals($expected, $input);
     $expected = array('zero' => 4, 'one' => 1, 'two' => 2, 'three' => 3);
     Arr::prepend($input, 'zero', 4);
     $this->assertEquals($expected, $input);
 }