forked from LiveCarta/PayPal-PHP-SDK
- Updated OpenId classes to be in API namespace - Updated PP Naming Convention to PayPal Naming Convention - FormatConverter Class got its own namespace - Handlers are grouped in Handler namespace - Samples and Tests Updated Accordingly
25 lines
536 B
PHP
25 lines
536 B
PHP
<?php
|
|
namespace PayPal\Test\Common;
|
|
|
|
use PayPal\Common\ArrayUtil;
|
|
|
|
class ArrayUtilTest extends \PHPUnit_Framework_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));
|
|
}
|
|
}
|