Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How is yii2 integrated with codecepetion in php?


Asked by Lucas Lyons on Dec 15, 2021 PHP



Testing: Yii2 is integrated with Codecepetion. Codeception is a PHP testing framework that simplifies the process of creating the unit, functional and acceptance tests for your application. Codeception facilitates the testing configuration of an application in a simple manner.
Also Know,
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. Once you created a project from a basic template you should see folder tests and codeception.yml configuration file.
Likewise, The Yii is a light-weighted, open-source PHP based framework which develops web application faster. It is used to accelerate web development applications quickly. It is a component-based, high-performance PHP framework for building large scale applications. This framework is built around the Model-View-Controller composite pattern.
Next,
The only required parameter for Yii2 module is configFile. This file with configuration for test configuration of Yii application. It should merge original application config overriding id value and provide different database for testing: Test config is recommended to store in config folder of application.
Additionally,
It is pretty hard to develop completely isolated unit tests in Yii, so an application is bootstrapped before each test case. Tests are configured in tests/unit.suite.yml file with Yii2 module enabled: