for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Axstrad library.
*
* (c) Dan Kempster <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* @author Dan Kempster <[email protected]>
* @package Axstrad\Common
* @subpackage Tests
*/
namespace Axstrad\Common\Tests\Util\ArrayUtil;
use Axstrad\Common\Util\ArrayUtil;
* Axstrad\Common\Tests\Util\ArrayUtil\IsAssociativeTest
* covers Axstrad\Common\Util\ArrayUtil::isAssociative
* @group unittest
class IsAssociativeTest extends \PHPUnit_Framework_TestCase
{
public function testReturnsTrueForAssociateArray()
$this->assertTrue(
ArrayUtil::isAssociative(array(
'one' => 'one',
'two' => 'two',
'three' => 'three',
))
);
}
public function testReturnsTrueForArrayWithNumericAndKeyIndexes()
3 => 'three',
public function testReturnsFalseForNumericallyIndexedArray()
$this->assertFalse(
1 => 'one',
2 => 'two',