forked from LiveCarta/PayPal-PHP-SDK
- Updated Api to enabled EC Parameters - Updated Tests - Updated Logging Manager - Added a feature to do validation on accessors.
25 lines
568 B
PHP
25 lines
568 B
PHP
<?php
|
|
namespace PayPal\Test\Common;
|
|
|
|
use PayPal\Common\PPArrayUtil;
|
|
|
|
class ArrayUtilTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
|
|
public function testIsAssocArray()
|
|
{
|
|
|
|
$arr = array(1, 2, 3);
|
|
$this->assertEquals(false, PPArrayUtil::isAssocArray($arr));
|
|
|
|
$arr = array(
|
|
'name' => 'John Doe',
|
|
'City' => 'San Jose'
|
|
);
|
|
$this->assertEquals(true, PPArrayUtil::isAssocArray($arr));
|
|
|
|
$arr[] = 'CA';
|
|
$this->assertEquals(false, PPArrayUtil::isAssocArray($arr));
|
|
}
|
|
}
|