Closed tianmingxing closed 7 years ago
Hello xiaoxing598, wich version of codeception do you have installed?
@Julian-B90 Yes, I'm sure.
>codecept --version
Codeception version 2.2.5
the codeception namespace seems to be C:\Users\Administrator\AppData\Roaming\Composer\vendor\codeception
shouldnt you change the namespace to that one of your app.
@dynasource I use the overall installation codeception
, In the direction that you put forward, how should I change?
Sorry i have forget this.
Please note, that the GitHub Issue Tracker is for bug reports and feature requests only.
Can you add you Question to the Forum?
what is the path of XxxFixture and how did you generate it?
@dynasource
I created this class in IDE, in accordance with the document requirement inherited from ActiveFixture
what is the filepath of XxxFixture
@dynasource
D:\PhpProjects\example\tests\codeception\fixtures\XxxFixture.php
D:\PhpProjects\example\tests\codeception\unit\fixtures\data\xxx.php
<?php
namespace tests\codeception\fixtures\;
use yii\test\ActiveFixture;
class XxxFixture extends ActiveFixture
{
public $modelClass = 'app\models\Xxx';
}
as you can see, your IDE has created your fixture inside your Application. You should update the configuration of your IDE to match with the paths in your Application. @Julian-B90 shows in his answer the namespace which should be working.
@Julian-B90 @dynasource Thank you very much for two big bull help, really because of the namespace problem, I follow the example of Julian-B90 to do, found that the problem is solved. Thank you very much.
I got the following error while I was running the test method: