public function testSetAndGetCategoryDescription() { $description = "Design can help you improve your sustainability credentials, create products and services that make people happy and it has positive benefits on business's bottom line."; $category = new Category(); $category->setDescription($description); $this->assertEquals($description, $category->getDescription()); }
/** * Create and load categories fixtures to database * * @param ObjectManager $manager Entity manager object */ public function load(ObjectManager $manager) { // categories $development = new Category(); $development->setName('Web Development'); $development->setSlug('web-development'); $development->setDetails('web-development'); $development->setDescription('In work we use Symfony2.'); $development->setCost('20 000'); $manager->persist($development); $mobileDevelopment = new Category(); $mobileDevelopment->setName('Mobile Development'); $mobileDevelopment->setSlug('mobile-development'); $mobileDevelopment->setDetails('mobile-development'); $mobileDevelopment->setDescription('In work we use Android and IOS.'); $mobileDevelopment->setCost('30 000'); $manager->persist($mobileDevelopment); $manager->flush(); $this->addReference('category-development', $development); $this->addReference('mobile-development', $mobileDevelopment); }