JBZoo\PHPUnit\ArrayTest::testAddEachKey PHP Метод

testAddEachKey() публичный Метод

public testAddEachKey ( )
    public function testAddEachKey()
    {
        $array = array(1, 2, 3, 4, 5);
        isSame(array("prefix_0" => 1, "prefix_1" => 2, "prefix_2" => 3, "prefix_3" => 4, "prefix_4" => 5), Arr::addEachKey($array, 'prefix_'));
        $array = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
        isSame(array("prefix_a" => 1, "prefix_b" => 2, "prefix_c" => 3, "prefix_d" => 4, "prefix_e" => 5), Arr::addEachKey($array, 'prefix_'));
    }