I am writing a simple test case. I installed codeception using composer. My test cases are located in root folder inside test case folder
when i try to run the following code
namespace app\tests\testcases;
use yii\codeception\TestCase;
class SomeMyTest extends TestCase
{
public function testOne()
{
echo "here";
}
}
when i try to run the code in a browser i get the following error
Fatal error: Class 'yii\codeception\TestCase' not found
There is this file called as yiisoft\yii2-codeception\TestCase.php in my project
What am i doing wrong? Can anyone help.?
Yii Framework provides basic and advanced application templates. Both include sample Codeception tests, thus to start with Codeception you need to start new Yii project from a one of those templates.
Codeception is a framework used for creating tests, including unit tests, functional tests, and acceptance tests. Despite the fact that it is based on PHP, the user needs only basic knowledge for starting work with the framework, thanks to the set of custom commands offered by Codeception.
https://github.com/yiisoft/yii2-codeception
composer require yiisoft/yii2-codeception --dev
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With