symfonyã®ãã¹ããã¬ã¼ã ã¯ã¼ã¯limeã¯PHPçã®Test::Moreã¨ãã¦åä½ã§ä½¿ãã«ãå ·åããããã©ãTest::Moreåä½ã®æ©è½ããåãã¦ãªãã®ã§ãæ¡å¼µã¢ã¸ã¥ã¼ã«ã§ãµãã¼ãããã¦ãããããªãã¹ããåºæ¥ãªãã ä¾ãã°ãä¾å¤ã®ãã¹ããªããã¯Test::Exceptionãæä¾ããthrows_okã§ç°¡åã«æ¸ãããã©ããããæ¨æºã®limeã§ãããã¨ããã¨ã <?php try { $threw = false; $obj->hoge(); // throw Exception } catch (Exception $e) { $threw = true; $t->is( $e->getMessage(), 'HOGEHOGE' ); } $t->ok( $threw === true, 'threw Exception' ); ã¿ãããªãã¹ããæ¸ããã¨ã«ãªã£ã¦é¢åãï¼è¿½è¨ï¼ãµã³ãã«
{{#tags}}- {{label}}
{{/tags}}