--- tests/Zend/Feed/CountTest.php (révision 10630) +++ tests/Zend/Feed/CountTest.php (copie de travail) @@ -49,4 +49,12 @@ $this->assertEquals($f->count(), 2, 'Feed count should be 2'); } + /** + * ZF-3848 + */ + public function testCountableInterface() + { + $f = Zend_Feed::importFile(dirname(__FILE__) . '/_files/TestAtomFeed.xml'); + $this->assertEquals(count($f), 2, 'Feed count should be 2'); + } } Index: library/Zend/Feed/Abstract.php =================================================================== --- library/Zend/Feed/Abstract.php (révision 10630) +++ library/Zend/Feed/Abstract.php (copie de travail) @@ -40,7 +40,7 @@ * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -abstract class Zend_Feed_Abstract extends Zend_Feed_Element implements Iterator +abstract class Zend_Feed_Abstract extends Zend_Feed_Element implements Iterator, Countable { /** * Current index on the collection of feed entries for the