我刚刚开始使用PhpSpec.当我这样做:
bin/phpspec desc src/CRMPicco/GolfBundle/Controller/CourseGuideController
我收到以下错误:
[PhpSpec\Exception\Locator\ResourceCreationException]
Can not find appropriate suite scope for class `src/CRMPicco/GolfBundle/Controller/CourseGuideController`.
Run Code Online (Sandbox Code Playgroud)
我CourseGuideController在该目录中创建了一个空类,因此该类存在.
我的phpspec.yml:
suites:
CRMPiccoGolfBundle: { namespace: CRMPicco, spec_path: src/CRMPicco/GolfBundle }
Run Code Online (Sandbox Code Playgroud)
CourseGuideController.php:
namespace CRMPicco\GolfBundle\Controller;
class CourseGuideController
{
}
Run Code Online (Sandbox Code Playgroud)