Yii Testing

TwitterFacebook
Get flash to fully experience Pearltrees

Testing: Overview

Testing is an indispensable process of software development. http://www.yiiframework.com/doc/guide/1.1/en/test.overview
NetBeans IDE for PHP supports PHPUnit automated tests. Thanks to PHPUnit, NetBeans IDE provides code coverage for PHP, similar to the code coverage the IDE provides for Python. Test output appears in the same feature-rich output window that the IDE's JUnit and Python test runners use.

PHPUnit and Selenium

http://netbeans.org/kb/docs/php/phpunit.html
http://www.yiiframework.com/doc/guide/1.1/en/test.functional Before reading this section, it is recommended that you read the Selenium documentation and the PHPUnit documentation first.

Functional Testing

Look up a class, method, property or event

CWebTestCase

http://www.yiiframework.com/doc/api/1.1/CWebTestCase
Automated tests need to be executed many times. To ensure the testing process is repeatable, we would like to run the tests in some known state called fixture .

Fixtures

http://www.yiiframework.com/doc/guide/1.1/en/test.fixture
http://www.yiiframework.com/doc/api/1.1/CDbFixtureManager

CDbFixtureManager

Look up a class, method, property or event
http://www.yiiframework.com/doc/guide/1.1/en/test.unit

Unit Testing

Because the Yii testing framework is built on top of PHPUnit , it is recommended that you go through the PHPUnit documentation first to get the basic understanding on how to write a unit test. We summarize in the following the basic principles of writing a unit test in Yii:
http://www.yiiframework.com/doc/api/1.1/CDbTestCase

CDbTestCase

Look up a class, method, property or event CDbTestCase is the base class for test cases about DB-related features. CDbTestCase provides database fixture management with the help of CDbFixtureManager .
http://www.yiiframework.com/forum/index.php/topic/4717-netbeans-68-phpunit-and-yii/

Netbeans, PHPunit and Yii

How to create PHPunit tests cases in Netbeans 6.8 for an Yii web application Ref.: http://www.yiiframew...ndpost&pid=6301 Environment: Product Version: NetBeans IDE Dev (Build 200909221401) Java: 1.6.0_10; Java HotSpotâ„¢ Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; es_ES (nb) Apache/2.2.6 (Win32) PHP/5.2.9-2 Yii framework 1.0.9 PHPUnit 3.3.15 1. Create a web application project with yiic tools (e.g. yiic webapp testdrive). 2.
DB Mocking

This page is created to supply short directions and general tips for managing a Yii application in NetBeans IDE. 1. http://www.yiiframework.com/wiki/83/netbeans-ide-and-yii-projects/

NetBeans IDE and Yii projects