Beispiel #1
0
 public function testCreateWithRange()
 {
     $ma1 = MutableArray::createWithRange(2, 7);
     $array1 = range(2, 7);
     $ma2 = MutableArray::createWithRange('d', 'h');
     $array2 = range('d', 'h');
     $ma3 = MutableArray::createWithRange(22, 11, 2);
     $array3 = range(22, 11, 2);
     $ma4 = MutableArray::createWithRange('y', 'k', 2);
     $array4 = range('y', 'k', 2);
     $this->assertTrue($array1 === $ma1->toArray());
     $this->assertTrue($array2 === $ma2->toArray());
     $this->assertTrue($array3 === $ma3->toArray());
     $this->assertTrue($array4 === $ma4->toArray());
 }
Beispiel #2
0
 public function testCreateWithRange()
 {
     $arrayzy1 = A::createWithRange(2, 7);
     $array1 = range(2, 7);
     $arrayzy2 = A::createWithRange('d', 'h');
     $array2 = range('d', 'h');
     $arrayzy3 = A::createWithRange(22, 11, 2);
     $array3 = range(22, 11, 2);
     $arrayzy4 = A::createWithRange('y', 'k', 2);
     $array4 = range('y', 'k', 2);
     $this->assertSame($array1, $arrayzy1->toArray());
     $this->assertSame($array2, $arrayzy2->toArray());
     $this->assertSame($array3, $arrayzy3->toArray());
     $this->assertSame($array4, $arrayzy4->toArray());
 }