Symfony2ã«ã¯DoctrineFixturesBundleã¨ãããã¼ã¿ãæå ¥ãããã³ãã«ãåå¨ããã³ãã³ããããã¼ã¿ãæå ¥ããæ¹æ³ã¯ããã¥ã¢ã«ã«è¨è¼ãããã¾ãã phpunitã®setUpå¦çã§ãã¼ã¿ããã¯ãªã¢âæå ¥ããããã£ãã®ã§ãããããæ¹ãè¦å½ãããªãã£ãã®ã§èª¿ã¹ãã¡ã¢ã¨ãªãã¾ãã ãã³ãã«ã®ã¤ã³ã¹ãã¼ã«ãªã©ã¯ãDoctrineFixturesBundleããåç §ãã¦ãã ããã 1.DoctrineFixturesBundleã®ç°¡åãªä½¿ç¨ä¾ 1.1 Fixtureãã¡ã¤ã«ã®ä½æ Hoge/UserBundleã«Fixtureãä½æããå ´åã®ä¾ã¨ãªãã¾ãã ãã³ãã«ã®ãDataFixtures/ORMãã®ä¸ã«fixtureãã¡ã¤ã«ãç½®ãã¾ã # mkdir -p src/Hoge/UserBundle/DataFixtures/ORM/ # vi src/Hoge/UserBun
ã¢ã¸ã£ã¤ã«éçºã«åãçµããã¼ã åãã®ã³ã¼ãã³ã°ããæè¡é¡§åãèªå®ã¹ã¯ã©ã ãã¹ã¿ã¼ç ä¿®ãªã©ã®å種ãã¬ã¼ãã³ã°ãæä¾ãã¦ãã¾ãããã²ãæ°è»½ã«ãç¸è«ãã ããï¼ååç¸è«ç¡æï¼ ã¿ãªããããã«ã¡ã¯ã@ryuzeeã§ãã åããã£ã¦ããæ¡ä»¶(PHP)ã¯ãã¨ãã¨ãã¹ãã³ã¼ãã®ãªãã¬ã¬ã·ã¼ãªããã¸ã§ã¯ãã§ããããæ¹åããããã«ãã£ã¨åä½ã確èªããããã®çµåã¬ãã«ã®èªåãã¹ããå¢ããã¦ãã¾ããã ãããªä¸ã§ãåã®ã¨ããã§ã¯ã©ããã£ã¦ãã¹ãç¨ã®fixtureã管çãã¦ãããäºä¾ã¨ãã¦ç´¹ä»ãããã¨æãã¾ãã æåã«ã³ã¢ã¨ãªãfixtureãç¨æããã¿ããªããããããã¹ããä½ãåã«ã³ã¢ã¨ãªããã¹ãç¨ã®fixtureã¯ç¨æãã¦ããã¾ãã ãããªãã¨ãã¿ããªã好ãåæã«fixtureãä½ã£ã¦ãã¾ãããã£ã¨ããéã«æ··ä¹±ã«é¥ãã¾ãã ããã°ã©ã æ¬ä½ã¨åæ§ã«ãDRYã®ååã§ãåããããªãã¹ããã¼ã¿ãç¹°ãè¿ãä½ã£ã¦ãã¾ããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}