コード例 #1
0
ファイル: ArrayUtilsTest.php プロジェクト: schwaen/stdlib
 /**
  * Test for Schwaen\Stdlib\ArrayUtils::hasStringKeys
  */
 public function testHasIntegerKeys()
 {
     $array1 = ['a' => true, 2 => true];
     $array2 = ['test', 'test', 'test'];
     $this->assertEquals(true, ArrayUtils::hasIntegerKeys($array1, false));
     $this->assertEquals(false, ArrayUtils::hasIntegerKeys($array1, true));
     $this->assertEquals(true, ArrayUtils::hasIntegerKeys($array2));
 }