2121use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
2222
2323/**
24- * Defines the sample data to load in the database when running the unit and
25- * functional tests.
26- *
27- * Execute this command to load the data:
24+ * Defines the sample blog posts to load in the database before running the unit
25+ * and functional tests. Execute this command to load the data.
2826 *
2927 * $ php bin/console doctrine:fixtures:load
3028 *
@@ -53,8 +51,9 @@ public function load(ObjectManager $manager)
5351 $ post ->setSummary ($ this ->getRandomPostSummary ());
5452 $ post ->setSlug ($ this ->container ->get ('slugger ' )->slugify ($ post ->getTitle ()));
5553 $ post ->setContent ($ this ->getPostContent ());
56- // This reference has been added in UserFixtures class and contains
57- // an instance of User entity.
54+ // "References" are the way to share objects between fixtures defined
55+ // in different files. This reference has been added in the UserFixtures
56+ // file and it contains an instance of the User entity.
5857 $ post ->setAuthor ($ this ->getReference ('anna-admin ' ));
5958 $ post ->setPublishedAt (new \DateTime ('now - ' .$ i .'days ' ));
6059
@@ -79,8 +78,9 @@ public function load(ObjectManager $manager)
7978 }
8079
8180 /**
82- * This method must return an array of fixtures classes
83- * on which the implementing class depends on.
81+ * Instead of defining the exact order in which the fixtures files must be loaded,
82+ * this method defines which other fixtures this file depends on. Then, Doctrine
83+ * will figure out the best order to fit all the dependencies.
8484 *
8585 * @return array
8686 */
@@ -170,14 +170,14 @@ private function getPhrases()
170170 'Eposs sunt solems de superbus fortis ' ,
171171 'Vae humani generis ' ,
172172 'Diatrias tolerare tanquam noster caesium ' ,
173- 'Teres talis orgias saepe tractare de camerarius flavum sensorem ' ,
173+ 'Teres talis saepe tractare de camerarius flavum sensorem ' ,
174174 'Silva de secundus galatae demitto quadra ' ,
175175 'Sunt accentores vitare salvus flavum parses ' ,
176- 'Potus sensim ducunt ad ferox abnoba ' ,
176+ 'Potus sensim ad ferox abnoba ' ,
177177 'Sunt seculaes transferre talis camerarius fluctuies ' ,
178178 'Era brevis ratione est ' ,
179179 'Sunt torquises imitari velox mirabilis medicinaes ' ,
180- 'Cum mineralis persuadere omnes finises desiderium bi-color ' ,
180+ 'Mineralis persuadere omnes finises desiderium ' ,
181181 'Bassus fatalis classiss virtualiter transferre de flavum ' ,
182182 ];
183183 }
0 commit comments