/** * Test the ArrayHelper::isAssociate method. * * @return void * * @since 1.0 * @sovers ArrayHelper::isAssociative */ public function testIsAssociative() { $this->assertThat(ArrayHelper::isAssociative(array(1, 2, 3)), $this->isFalse(), 'Line: ' . __LINE__ . ' This array should not be associative.'); $this->assertThat(ArrayHelper::isAssociative(array('a' => 1, 'b' => 2, 'c' => 3)), $this->isTrue(), 'Line: ' . __LINE__ . ' This array should be associative.'); $this->assertThat(ArrayHelper::isAssociative(array('a' => 1, 2, 'c' => 3)), $this->isTrue(), 'Line: ' . __LINE__ . ' This array should be associative.'); }