public function testGetLoadedProductCollection() { $this->_block->setShowRootCategory(true); $collection = $this->_block->getLoadedProductCollection(); $this->assertInstanceOf('Mage_Catalog_Model_Resource_Product_Collection', $collection); /* Check that root category was defined for Layer as current */ $this->assertEquals(2, $this->_block->getLayer()->getCurrentCategory()->getId()); }