public function testGetByName() { $collection = new PropertyCollection(); $collection->add(new Property(array('name' => 'test'))); $this->assertEquals('test', $collection->getByName('test')->current()->getName()); }