Mage::getModel('catalog/category')->load($id) is not working (no data is loaded, and getId() is empty).
but if I do this:
$collection = Mage::getModel('catalog/category')->getCollection();
foreach($collection as $category) {
if($category->getId() == $id) {
echo "it has been founnnd!!!";
}
}
it works?
I should mention I am running this code through cli with phpunit tests so its bootstrapped. My guess is that there might be an issue with scope?