/**
  * @dataProvider instanceProvider
  * @param HashArray $array
  */
 public function testIndicesAreUpToDate(HashArray $array)
 {
     $this->assertInternalType('boolean', $array->indicesAreUpToDate());
     $mutable = new MutableHashable();
     $array->addElement($mutable);
     $mutable->text = '~[,,_,,]:3';
     $this->assertFalse($array->indicesAreUpToDate());
     $array->rebuildIndices();
     $this->assertTrue($array->indicesAreUpToDate());
 }
 public function __construct($input = null)
 {
     $this->acceptDuplicates = true;
     parent::__construct($input);
 }
Ejemplo n.º 3
0
 /**
  * @dataProvider instanceProvider
  * @param HashArray $array
  */
 public function testEquals(HashArray $array)
 {
     $this->assertTrue($array->equals($array));
     $this->assertFalse($array->equals(42));
 }