drfif48428 2015-10-01 06:49
浏览 346
已采纳

PHPUnit - 找不到测试类

When I am trying to test a class, it can't find the class to be tested.

Under the following line you see the test:

    <?php

class FacebookRestTest extends \PHPUnit_Framework_TestCase
{
    public function testFacebookFirstTest()
    {
        $pageid = 634336563297055;
        $since = 1438387200;
        $until = 1443052800;

        $facebook = new FacebookRest(new DataReader(new Report($pageid, $since, $until)));
        $page = $facebook->getPage();
        $this->assertTrue(!empty($page));
    }
}

But when I run the test in the terminal, it throws an error that it can't find the FacebookRest class.

Here is the error:

Fatal error: Class 'FacebookRest' not found in /Applications/MAMP/htdocs/faceboo1/tests/FacebookRestTest.php on line 11

Anyone know how to solve this?

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 edge跟谷歌浏览器的默认搜索引擎无法修改,如何解决?
      • ¥15 access数据库出错
      • ¥100 matlab数学建模习题,求解答
      • ¥15 blender python输出纹理坐标(像素级)与三维坐标的对应关系
      • ¥15 python文件分发
      • ¥15 关于#c语言#的问题:要求:输出格式要界面直观、清晰大方、格式规范
      • ¥15 计算机组成汇编语言电路升级
      • ¥15 hadoop网站点击流数据分析项目
      • ¥15 TDA4 USB 识别不到的问题
      • ¥36 禁用ssl重协商以达到解决DOS漏洞