Exemple #1
0
 public function testAddArray()
 {
     $writer = new Writer();
     $property = new \ReflectionProperty($writer, 'collection');
     $property->setAccessible(true);
     $meta = new Meta(array('test' => true));
     $writer->add($meta);
     $meta2 = new Meta(array('test2' => true));
     $writer->addArray(array($meta2));
     $collection = $property->getValue($writer);
     $this->assertEquals($meta, $collection[0]);
     $this->assertEquals($meta2, $collection[1]);
 }