This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 241996 - Nette Tester - set PHP CLI automatically
Summary: Nette Tester - set PHP CLI automatically
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Nette (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-17 10:59 UTC by bauer01
Modified: 2014-05-06 08:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bauer01 2014-02-17 10:59:20 UTC
Debian 7 wheezy
PHP 5.4.4-14+deb7u7 (cli)
Nette Tester 1.0.0

If I correctly setup test folder and tester executable, there is still problem with executing tests. Nette tester wants to run tests under the cgi mode by default. But who develop under the CGI? :-)

see my Netbeans output:
-----------------
"/usr/bin/php" "/home/sedlak/.composer/vendor/nette/tester/Tester/tester" "--tap" "-s" "/var/www/new-project/tests"
 _____ ___  ___ _____ ___  ___
|_   _/ __)( __/_   _/ __)| _ )
  |_| \___ /___) |_| \___ |_|_\  v1.0.0


Error: Unable to run 'php-cgi': sh: 1: php-cgi: not found 
Done.
-----------------

I think that tester should be executed with parameter -p <php_interpeter> (eg. /user/bin/php from Netbeans -> Tools -> Options -> PHP -> General -> Command line -> PHP 5 interpreter) by default.
Comment 1 Ondrej Brejla 2014-02-17 12:45:12 UTC
Tome? :)
Comment 2 Ondrej Brejla 2014-02-17 12:46:03 UTC
Lol, didn't reassign :) So once again, Tome? :)
Comment 3 Tomas Mysik 2014-02-17 12:47:55 UTC
Will have a look at it. Thanks.
Comment 4 Tomas Mysik 2014-02-19 08:29:04 UTC
See [1] for likely the best possible solution.

Thanks.
[1] https://github.com/nette/tester/issues/100
Comment 5 bauer01 2014-02-19 09:41:41 UTC
(In reply to Tomas Mysik from comment #4)
> See [1] for likely the best possible solution.
> 
> Thanks.
> [1] https://github.com/nette/tester/issues/100

I agree with that, thx :-)
Comment 6 Tomas Mysik 2014-02-19 10:03:52 UTC
Unfortunately, it is too late for NB 8.0. We will try to deliver proper fix for a Patch (not sure when it will be available).

As a workaround:
- simply install php-cgi package ;) or
- in Project Properties, for Tester script set "/my/tester -p php" (without quotes) and save it, it will work as you can see in the Output window:

"/usr/bin/php" "/home/gapon/NetBeansProjects/Calculator-Nette-Tester/src/vendor/bin/tester" "-p" "php" "--tap" "-s" "/home/gapon/NetBeansProjects/Calculator-Nette-Tester/test"

Thanks.
Comment 7 Tomas Mysik 2014-04-25 07:57:09 UTC
Fixed, please verify. Now, it is possible to set default executable in IDE Options as well as in Project Properties.

Thanks.

http://hg.netbeans.org/web-main/rev/b9359dfa8c1b
Comment 8 Quality Engineering 2014-04-26 04:51:34 UTC
Integrated into 'main-silver', will be available in build *201404260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b9359dfa8c1b
User: Tomas Mysik <tmysik@netbeans.org>
Log: #241996 - Nette Tester - set PHP CLI automatically
Comment 9 Vladimir Riha 2014-05-02 08:17:07 UTC
It seems to be working OK, but I have one question:
 - in Tools|Options|PHP|Frameworks->Nette Tester, there is by default displayed message "Tester file must be selected". Should be there? E.g. Zend2 or Atoum do not show any validation msg


Product Version: NetBeans IDE Dev (Build 201405020001)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 10 Tomas Mysik 2014-05-05 05:06:44 UTC
(In reply to Vladimir Riha from comment #9)
> I have one question:
>  - in Tools|Options|PHP|Frameworks->Nette Tester, there is by default
> displayed message "Tester file must be selected". Should be there? E.g.
> Zend2 or Atoum do not show any validation msg

It is just a warning but please, report it, I will check the other modules and do it the same way.

Thanks.
Comment 11 Vladimir Riha 2014-05-06 08:02:37 UTC
OK, thank you. Verified then