Automated tests need to be executed many times. To ensure that the testing process is repeatable, we want to test it in some known state, which we call a specific state. For example, in a blog app, test the article creation feature, each time we test, the table related to the article (for example. The Post table, Comment table) should be restored to a specific state. The PHPUnit documentation is a good description of the general construction of a particular state. This section focuses on how to build a database-specific state as in the example just described. Setting the specific state of the build database is probably one of the most time-consuming parts of testing an application with a database for back-end support. The Cbbfixturemanager application component introduced by YII can alleviate this problem effectively. When a set of tests is performed, it basically does the following: it resets the test-related data to a known state before all tests are run. Before a single test runs, It resets the specific table to the known state. During a test method execution, it provides a provider for the row data that is supplied to a particular state. Please press
1. Yii Framework Official Guide Series 38--define a specific state (fixtures)
Summary: Automated testing needs to be executed many times. To make sure that the testing process is repeatable, we want to test it in some known state, which we call a specific state. For example, test article creation in a blog app ...
"Related question and answer recommendation":