recently i started using phpunit. I like it very much and so on... but some-times unnecessary info annoying me
So, my question is how to disable it???
phpunit is stopping support via PEAR channels after december meaning you won't get updates etc to your current installation, you can use a PHAR package or you can use composer to install phpunit
see
http://pear.phpunit.de/
phpunit pear end-of-life announcement
to remove the error reinstall using alternative install methods see for more details
phpunit installation documentation
you can remove pear installation with this command
pear uninstall phpunit/PHPUnit
and you can install using phar with these commands
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit
Edit: Note you need additional optional dependencies for yii( which PEAR may have handled) to be able to run test cases and so if you are using composer use
composer global require "phpunit/phpunit>=3.7.*"
composer global require 'phpunit/phpunit-selenium=*'
composer global require 'phpunit/phpunit-story=*'
composer global require 'phpunit/dbunit=*'
composer global require 'phpunit/php-invoker=*'
To remove the PEAR version of PHPUnit:
pear uninstall phpunit/PHPUnit
The instructions for installing the new version of PHPUnit are here:
http://phpunit.de/manual/4.1/en/installation.html
Related
I was using Phantomjs with Phoenix framework for test, and the package I use in phoenix is hound.
I previously installed phantomjs with apt-get which was giving problems (this github comment said the installation method was the culprit), so I downloaded the latest binary from the official website but that was giving permissions denied error, so I had to build it from the source, but to my surprise the build.py which is mentioned in the official guide wasn't avaialble, so I even failed to build it that way.
I also failed to install through npm, so I gave up on phantomjs.
Now I installed slimerjs, but I don't know what is slimerjs's alternative command to phantomjs --wd.
I have test failures. I want to see the details and experiment and perhaps debug, so I unpack the module dist. Now I expect to find some analogue to Setup.hs, setup.py, Build.PL, Rakefile etc., but there are no executables. How do you manually build and test verbosely?
Installing modules
First I'd check more into zef
zef install module::name
zef test /path/to/module
zef --help
zef comes with Rakudo-Star.
If you make a change and want to reinstall the module with the change and it doesn't want to install it, you can "force" it:
zef install --force-install ./relative/path/to/module
Or, if you bump the version in META6.json, you don't have to force it:
zef install ./relative/path/to/module
Testing modules
To test a module, you can use prove to run all of the tests in its test directory:
prove --exec=perl6 -r t/
To run an individual test, simply use perl6:
perl6 t/test.t
See also
Running Tests
You also might be interested in 6pm, but I don't have enough experience with it to comment on it at this time.
I got an error.
$ valet install
[DomainException]
Unable to determine linked PHP.
install
'which' command returns:
$ which php
/usr/local/Cellar/php70/7.0.6/bin/php
I used Homebrew to instal php7.1 , So I ran this command in terminal
ln -s /usr/local/opt/php71/bin/php /usr/local/bin/php
and everything is done.
if your PHP version 7.x and valet > 2.0.8 update valet
valet stop
valet uninstall
brew install php
composer global require laravel/valet
then valet install
Homebrew creates (or attempts to create) symlinks in /usr/local/bin.
Start by running the following to attempt to create a link.
brew link php70
It'll give you information as to whether or not it was successful. Occasionally permissions are problematic and you can resolve this with
sudo chown -R `whoami`:admin /usr/local/bin
Then try running the brew link command again.
Alternately brew link may give you instructions, or you can use brew doctor to get a report on any problems which exist with your Homebrew installation.
When it's set up properly after running ls -la /usr/local/bin | grep bin/php$ you should see something similar to
lrwxr-xr-x 1 YOURUSER admin 29 10 May 21:40 php -> /usr/local/Cellar/php70/7.0.6/bin/php
I was going to update Laravel Valet from version 1.* to 2 and ran same error like this
Unable to determine linked PHP
The solution was to run
composer global update
before I ran
valet install
This happens when your brew php gets Updated.
If you do brew install php this will work but will install php 7.2 by default.
If you want php#7.1 you have to do brew install php#7.1 this will install php7.1 and now when you restart valet valet restart you might get an error. Unable to determine linked PHP.
To make this work with php7.1 you have make brew link
brew link php71
you may have this error
Warning: php#7.1 is keg-only and must be linked with
to fix this
brew link --force php71
now valet should work on php7.1
I tried all of the suggestions here—and several from elsewhere—before I hit on the solution. This applies to PHP 7.2 (no guarantee for other versions). If you are using the original Larvel Valet, open the file:
~/.composer/vendor/laravel/valet/cli/Valet/Brew.php
...or, if you're using Valet+
~/.composer/vendor/weprovide/valet-plus/cli/Valet/Brew.php
Locate the supportedPhpVersions method. In some versions, it will return an array right in the method:
return ['php72', 'php71', 'php70', 'php56'];
Change this to:
return ['7.2', 'php72', 'php71', 'php70', 'php56'];
In other cases, it'll reference const SUPPORTED_PHP_VERSIONS, and the change will be similar.
Save the file, restart valet, and Bob's your uncle!
I am new for TDD and following "Agile Web application Development with yii" book. I have successfully installed phpunit and trying to install selenium extension as book recommends. But when i try to install phpunit_selenim, it gives me following error:
No releases available for package "pear.phpunit.de/PHP_Selenium" install failed
I have tried to do the installation process here, but it did not help, i got the same result. is there anything i missed up or there is another way to install it?
P.S. I am using ubuntu with lamp server to develop yii application.
Try next sequence of commands:
pear clear-cache
pear config-set auto_discover 1
pear install PHPUnit/PHPUnit_Selenium
(Also looks like it was attempt to install PHP_Selenium instead of PHPUnit_Selenium package according to your error message)
Can't add comment, so before Sergey's answer do:
sudo pear install phpunit
sudo pear channel-discover pear.phpunit.de
After, Sergey's:
pear clear-cache
pear config-set auto_discover 1
pear install PHPUnit/PHPUnit_Selenium
This work for me at least.
I am a novice with zeroMQ and I am stuck at binding ØMQ with java on a server running CentOS release 5.9.
Unfortunately, I do not have super user/root privileges on the server and am trying to install ØMQ as a normal user with restricted privileges. I have installed ØMQ by following instructions on http://www.zeromq.org/area:download
Make sure that libtool, autoconf, automake are installed.
Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
Unpack the .tar.gz source archive.
Run ./configure, followed by make.
Could not run the following obviously
To install ØMQ system-wide run sudo make install.
On Linux, run sudo ldconfig after installing ØMQ.
Then I attempted to install jzmq.
Cloned [git clone https://github.com/zeromq/jzmq.git]
Ran autogen.sh
Ran configure
At this point I get the following error
checking for ZeroMQ... no
checking zmq.h usability... no
checking zmq.h presence... no
checking for zmq.h... no
configure: error: cannot find zmq.h
As a result of the above error I am not able to run java tests and get error "no jzmq in java.library.path".
Can anybody help/direct me to how to get java binding for zeromq work when you dont have root privileges to install it? Its difficult to get IT department to install a new software on servers.
Appreciate your help.
Note: I do not have write permissions to /usr directory
Thanks
GBP
This can be overcome by adding --with-zeromq=/home/user/zeromq (installation directory of zeromq)
./configure --with-zeromq=/home/user/zeromq
Other steps include
export LD_LIBRARY_PATH=/home/user/zeromq/lib
You can also use JeroMQ (https://github.com/zeromq/jeromq) which is a pure Java implementation of ZeroMQ
I got this working by running autogen.sh on OEL 6 then running configure / compiling / installing on CentOS 5.9. I briefly looked into why autogen.sh was failing and the problem was the tool chain was too old. Since I had a more up-to-date system with a modern tool chain available running autogen.sh on something other than CentOS 5 was the easiest path for me. I'm sure it works fine with other modern Linux variants, I had OEL 6 at my finger tips.
I also did not have access to a standard directory for installation. To get that working I added zmq.jar to my class path, and the run-time linker needed to be able to find the zeromq and jzmq run-time libraries.
I faced the same issue on CentOS 6.5 and found that you need to install "gcc-c++" for this to work.
I used the following to install dependencies:
yum -y install jdk zeromq-devel unzip libtool gcc autoconf automake gcc-c++ python
Note that "jdk" comes from our private repository and it's same what can be downloaded from java.com
The following public repositories are installed on server:
atomic
Actually, I ended up having this same issue, and the following script worked for me, where I installed zeromq into ~ (so that I have ~/lib contains libzmq.a libzmq.la libzmq.so libzmq.so.3 libzmq.so.3.1.0 pkgconfig)
./autogen.sh ./configure --prefix=$HOME \ #because you don't have root privileges
--with-zeromq=$HOME --includedir=$HOME/include/ --libdir=$HOME/lib/
./make
./make -n install
#to check to see if it installs it to the right location
make install