Wiki

Sorted by viewsX
Displaying 261-270 of 468 result(s).

TDD with PHPUnit_Story and Yii

Created about a year ago by sidewinderTutorials1 comment – viewed 9,227 times – ( +7 )
Unfortunately Sebastian Bergmann decided to remove PHPUnit_Story from future PHPUnit versions. Thanks to elvan for pointing me to the relevant comment. As an alternative Behat has been suggested but it seems too bloated for me TBH. There is also PHPSpec but it's non flexible enough for me and tightly bound with English language (What's the purpose of using DSL if customers can't speak English). Since both frameworks are quite young I think I'll just stick to PHPUnit and see what's going on on the BDD frameworks arena. Even PHPUnit_Story parts of this entry are going to be deprecated soon, rest is still valid! When doing TDD, please write tests with design and behaviour of application in mind instead of testing single functions.

Simple way to use AutoComplete using different ID and Display Value

Created 9 months ago by raheelk2kTutorials1 comment – viewed 9,201 times – ( +3 )
Usually when we use AutoComplete in a project, We need to show "title" or "name" in the list, while when the form is posted, we need some sort of integer ID referring to the selected value. Out of the Box, CJuiAutoComplete widget doesn't provides different display text and post values.

Enforcing "You must agree" requirements in forms

Created 2 years ago by Steve FriedlHow-tos2 comments – viewed 9,176 times – ( +26 )
Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:
tags: validation

free PHP IDE CodeLobster supports Yii framework

Created about a year ago by clodTutorials0 comments – viewed 9,162 times – ( +5 )
This page is created to supply short directions and general tips for managing a Yii application in Codelobster PHP Edition.

Using loginRequiredAjaxResponse to solve ajax session timeout

Created about a year ago by RutgerHow-tos3 comments – viewed 9,141 times – ( +12 )
This solution requires Yii 1.1.9 or above

Configuring CWebLogRoute for DB profiling

Created about a year ago by Igor IvanovicTutorials1 comment – viewed 9,131 times – ( +3 )
/index.php /protected/config/main.php
tags: logger, profiler, db

Auto TDD - How to auto-run PHPUnit

Created 2 years ago by imeheszTips3 comments – viewed 9,127 times – ( +3 )
If you are lucky enough and have the privilege to develop on a Linux based environment, this little tip might boost-up your TDD process (at least the Unit Testing part). Please note, that this should work just fine with Apple computers also, but not tested!
tags: PHPUnit, testing, TDD

Using cache in CActiveDataProvider

Created about a year ago by StammTips7 comments – viewed 9,126 times – ( +17 )
First param in CActiveDataProvider could be a string with model name or instance of class. So, you may use CActiveRecord::cache() for cache, but you need set third param to 2, because you should cache 2 queries: counting and get data.

Setting up PHPUnit and Selenium with IntelliJ IDEA/PhpStorm

Created 8 months ago by rAWTAZHow-tos0 comments – viewed 9,099 times – ( +5 )
This article intends to summarize the steps taken to set up PHPUnit and Selenium for a Yii project, with IntelliJ IDEA Ultimate (the IDE). It was done on Mac OS X 10.6.

How to use YiiBooster TbFileUpload widget

Created 5 months ago by Antonio RamirezHow-tos7 comments – viewed 9,009 times – ( +7 )
The following wiki is to explain how to make use of the TbFileUpload widget from YiiBooster. I have received a couple of requests and I thought was worth writing a wiki for it.