Difference between #33 and #39 of
NetBeans IDE and Yii projects

Changes

Title unchanged

NetBeans IDE and Yii projects

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

IDE, Selenium, PHPUnit, XDebug, NetBeans

Content changed

[...]
## 1. Code completion

To get context sensitive code completion, follow these steps:

- I
ncludf the Yii folder (assuming it is properly placed outside project directory)ramework folder is not inside the project folder: - Open "File > Project properties > PHP Include Path" and add the Yii framework root path - Ignore yiilite.php to avoid doubled/missing documentation - Open "Tools > Options > Miscellaneous > Files" - Add to the front of "Files Ignored by the IDE" the file "^(_yiilite\\.php_|CVS|SCCS|...." - Restart NetBeans  
 
#### Usage:
 
 
- Typing suggestions: Ctrl-Space
 
- Show Function parameters: Ctrl-P
 
- Comment your own code with PHPDoc style. [Here's a good example](http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_sample2.pkg.html).
- Code completion in view files ###
- Add the following PHPDoc statement at the head of the file to use code completion in view files. (you may add additional passed parameters as well)
[...]
```

#### Usage:
 
 
- Typing suggestions: Ctrl-Space
 
- Show Function parameters: Ctrl-P
 
- Comment your own code with PHPDoc style. [Here's a good example](http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_sample2.pkg.html).
 
 
## 2. Code templates

You can create code templates for commonly used/overridden function in Yii.
[...]
- Download this template set to get started: [http://fbe.am/hly (version 2)](http://fbe.am/hly). View all available commands [in this printable cheat sheet](http://www.cheatography.com/hoplayann/cheat-sheets/yii-code-templates-for-netbeans/).
- Go to "Tools > Options > Editor > Code Templates"
- Hit "Import", select the file, and choose "Code Templates"
 
   - You might get an error message "invalid zip file" if you are importing to a older/newer version of NetBeans. Open up the zip file, edit build.info, and set the correct path to Userdir.


#### Usage:
[...]
- Install PHPUnit
- Follow [the official
version 3.6 installation instructions](https://www.phpunit.de/manual/3.6current/en/installation.html). - Open "Tools > Options > PHP > Unit TestingFrameworks & Tools -> PHPUnit" and set the correct path to the launch script. This is phpunit.bat in Windows and usually /usr/bin/phpunit in Linux. - Install SeleniumRC by getting the NetBeans plugin
 
with one of these two methods:
 
  - Through NetBeans plugins (may be outdated):
 
   
- Open "Tools > Plugins > Available Plugins"     - Install "Selenium Module for PHP"Server" 
 
     - Install ["Selenium Module for PHP"](http://plugins.netbeans.org/plugin/37753/selenium-module-for-php)
 
  - Through the Selenium website:
 
     - Download and execute ["Selenium Server"](http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar)
- Configure project options - Open "File > Project properties > Sources" and set "Test FTesting":
 
     - Add f
older" to \[PROJECT ROOT\]/protected/tests (If the whole project testing doesn't work, try \[PROJECT ROOT\]/protected/tests/u
 
     - Enable testing provider "PHPU
nit)" - Open "File > Project properties > PHPUnit" and sTesting > PHPUnit":
 
     - S
et "Use Bootstrap" to \[PROJECT ROOT\]/protected/tests/bootstrap.php, and
 
     - Set
"Use XML Configuration" to \[PROJECT ROOT\]/protected/tests/phpunit.xml

#### Usage:

- Test whole project: Alt+F6
- Test single file: Shift-F6
[...]
65 0
66 followers
Viewed: 252 048 times
Version: 1.1
Category: Tutorials
Written by: marcovtwout
Last updated by: marcovtwout
Created on: Sep 21, 2010
Last updated: 9 years ago
Update Article

Revisions

View all history