Пример #1
0
 /**
  * @magentoDataFixture Mage/Catalog/_files/categories.php
  */
 public function testGetStoreCategories()
 {
     $categories = $this->_helper->getStoreCategories();
     $this->assertInstanceOf('Varien_Data_Tree_Node_Collection', $categories);
     $index = 0;
     $expectedPaths = array(array(3, '1/2/3'), array(6, '1/2/6'), array(7, '1/2/7'));
     foreach ($categories as $category) {
         $this->assertInstanceOf('Varien_Data_Tree_Node', $category);
         $this->assertEquals($expectedPaths[$index][0], $category->getId());
         $this->assertEquals($expectedPaths[$index][1], $category->getData('path'));
         $index++;
     }
 }