Testing the database connection in Yii framework -


the following commands produce errors. , have been working yii 4 days now.. please solve this.

c:\wamp\www\yii\trackstar\protected\tests\unit>phpunit dbtest.php 'phpunit' not recognized internal or external command, operable program or batch file. 

the above error states phpunit not installed in wamp stack.

the easiest method install using pear. try following method install phpunit pear :

go directory php located. typically, \bin\php\php5.3.8

we’ll call path “php’s location”

  1. download “go-pear.phar” location: pear.php.net/go-pear.phar

    create folder “pear” in php’s location

    put downloaded “go-pear.phar” file in location.

  2. open command prompt administrative privilege. this, click on start menu, type “cmd” – can see cmd.exe icon. right-click on icon , click “run administrator”

    cmd.exe open. go direcotry of php’s location, typing “cd” command. example, wamp located in “d:\wamp”, write following command:

    d: cd wamp\bin\php\php5.3.8 

    now run downloaded file, typing:

    php .\pear\go-pear.phar 

    installation begin! during installation, you’ll need respond prompts, hit enter/press “y” when necessary.

    after installing, double-click , instal “pear_env.reg” found in php’s location.

    optionally, can add php’s location in path variable.

after can install phpunit :

  1. open command-prompt, go php’s location using cd, , type:

    pear channel-discover components.ez.no pear channel-discover pear.phpunit.de pear channel-discover pear.symfony-project.com pear install --alldeps phpunit/phpunit 

    type phpunit –version confirm installation.

that should install phpunit, , may try

phpunit dbtest.php 

hopefully, should work.

regards,


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -