forked from LiveCarta/PayPal-PHP-SDK
Initial commit
This commit is contained in:
22
tests/PayPal/Test/Common/ArrayUtilTest.php
Normal file
22
tests/PayPal/Test/Common/ArrayUtilTest.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user