This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PayPal-PHP-SDK/tests/PayPal/Test/Common/ArrayUtilTest.php

25 lines
548 B
PHP

<?php
namespace PayPal\Test\Common;
use PayPal\Common\ArrayUtil;
use PHPUnit\Framework\TestCase;
class ArrayUtilTest extends TestCase
{
public function testIsAssocArray()
{
$arr = array(1, 2, 3);
$this->assertEquals(false, ArrayUtil::isAssocArray($arr));
$arr = array(
'name' => 'John Doe',
'City' => 'San Jose'
);
$this->assertEquals(true, ArrayUtil::isAssocArray($arr));
$arr[] = 'CA';
$this->assertEquals(false, ArrayUtil::isAssocArray($arr));
}
}