Exemplo n.º 1
0
 public function testArrayObjectUsage()
 {
     $data = array('prop' => 'value');
     $this->collection->exchangeArray(array((object) $data));
     $this->assertCount(1, $this->collection);
     $this->assertEquals((object) $data, $this->collection[0]);
     $this->collection[] = (object) $data;
     $this->assertCount(2, $this->collection);
     $this->assertEquals((object) $data, $this->collection[1]);
     foreach ($this->collection as $component) {
         $this->assertEquals((object) $data, $component);
     }
 }