码迷,mamicode.com
首页 > Web开发 > 详细

phpunit Drupal7

时间:2019-05-19 12:01:48      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:bootstrap   include   att   dmi   xdebug   tdd   extend   function   pat   

http://patshaughnessy.net/2008/12/12/writing-your-first-phpunit-test-in-drupal

phpunit TddTests modules/tdd/TddTests.php 
<?php
require_once ‘./includes/bootstrap.inc‘;
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
class TddTests extends PHPUnit_Framework_TestCase
{
  public function test_tdd_help()
  {
    $this->assertEquals(
      tdd_help(‘admin/content/tdd‘), "<p>Help for TDD module.</p>");
  }
}
?>

https://tlattimore.com/blog/using-phpunit-with-drupal-7/
https://drupal.stackexchange.com/questions/216827/debugging-a-custom-module-with-xdebug-and-phpunit

phpunit Drupal7

标签:bootstrap   include   att   dmi   xdebug   tdd   extend   function   pat   

原文地址:https://www.cnblogs.com/qinqiu/p/10888395.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!