I have this project structure in Yii2 Framework:
www
-- controllers
-- models
-- services
---- SomeService.php
-- bin
---- phpspec
-- spec
---- services
------ SomeServiceSpec.php
-- phpspec.yml
I want to use SomeServiceSpec.php to test SomeService.php.
My phpspec.yml:
formatter.name: pretty
suites:
default:
namespace: app
psr4_prefix: app
src_path: ./
The namespace of service is app/services/
but here is no real app
folder.
When I do bin/phpspec run' I have the error class appservicesSomeService does not exist.`.
Then it asks if I want it to be created. If I agree it ask if I want it to be overwritten!
I was trying to set src_path as .
, /
, %paths.config%
but it does not help.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…