473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

codecept is not working, phpunit , Yii framework, PHP

103 100+
I am following instructions in file, which was created automatically when creating advanced demo yii application:
„C:\Bitnami\wampstack-5.4.38-0\apache2\htdocs\TamasCovacsYii\advanced\tests\REA DME.md“

They say " 1. Install Codeception if it's not yet installed:"
I run: c:\Bitnami\wampstack-5.4.38-0\apache2\htdocs\TamasCovacsYii\advanced>composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*"

They say "If you've never used Composer for global packages run `composer global status`."
I run: c:\Bitnami\wampstack-5.4.38-0\apache2\htdocs\TamasCovacsYii\advanced>composer global status

They say :Then add `<directory>/vendor/bin` to you `PATH` environment variable. Now you're able to use `codecept` from command line globally."

I found directory with codecept using:
c:\Bitnami\wampstack-5.4.38-0\apache2\htdocs\TamasCovacsYii\advanced>cd c:\
c:\>dir codecep* /s
In my case this outputted directory „C:\Users\_userprofilename_\AppData\Roaming\Compos er\vendor\bin“
which i added to System->Advanced System Settings → Environmental variables → PATH

But if i try codecept or bin\codecept command from command line, it is not recognised – the message is „The system cannot find the path specified.“ I have tried the following commands:
c:\...\advanced>bin\codecept
c:\...\advanced>bin/codecept
c:\...\advanced>codecept


The phpunit or bin\phpunit is also not recognised as a command, athough it is on the path
C:\Users\_userprofilename_\AppData\Roaming\Compose r\vendor\bin
contains codecept and phpunit.

*********
I have checked composer.json file in directory:
Expand|Select|Wrap|Line Numbers
  1. C:\Bitnami\wampstack-5.4.38-0\apache2\htdocs\TamasCovacsYii\advanced. It had no phpunit and codeception
  2.     "require-dev": {
  3.         "yiisoft/yii2-codeception": "*",
  4.         "yiisoft/yii2-debug": "*",
  5.         "yiisoft/yii2-gii": "*",
  6.         "yiisoft/yii2-faker": "*"
  7.     },
Thus i have added these lines to the file:
Expand|Select|Wrap|Line Numbers
  1.     "require-dev": {
  2.         "yiisoft/yii2-codeception": "*",
  3.         "yiisoft/yii2-debug": "*",
  4.         "yiisoft/yii2-gii": "*",
  5.         "yiisoft/yii2-faker": "*",
  6.         "phpunit/phpunit":"4.5.*",
  7.         "codeception/codeception:*",
  8.         "codeception/specify": "*",
  9.         "codeception/verify": "*"
  10.     },
and run from command line composer update:
c:\Bitnami\wampstack-5.4.38-0\apache2\htdocs\TamasCovacsYii\advanced>composer update
It loaded and installed dozens of libraries including: "phpunit/phpunit":"4.5.*", "codeception/codeception:*","codeception/specify": "*", "codeception/verify": "*"


But command bin\codecept and bin\phpunit is not working from command line:
c:\Bitnami\wampstack-5.4.38-0\apache2\htdocs\TamasCovacsYii\advanced>bin\codec ept
The system cannot find the path specified.

If I check folder
C:\Users\_userprofilename_\AppData\Roaming\Compose r\vendor\bin
I see four files, codecept, codecept.bat, phpunit, phpunit.bat

I also have symfony project with analogous composer.json file. If i change cmd to that project folder i can run phpunit:
c:\Bitnami\wampstack-5.4.38-0\sym_prog\myproject>bin\phpunit
PHPUnit 4.5.0 by Sebastian Bergmann and contributors....

About phpunit see:
https://phpunit.de/manual/current/en...ation.composer

About codeception see:
http://codeception.com/install
https://github.com/Codeception/Specify
https://packagist.org/packages/codeception/specify

Why codecept and phpunit is not working from yii project folder? Where is my mistake?
Apr 18 '15 #1
0 1494

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Christian Surieux | last post by:
Hello, It seems that Crystal report is using the framework 1.0 with VS 2003. The version installed in my project is 9.1.5, the good one, and properties show that it has been built with framework...
4
by: psb | last post by:
not sure if anyone still uses this, but I installed .NetFramework 1.0 sp3 (released, aug31,2004) and after that I was getting some javascript errors. I have a user control inside a webform. ...
3
by: Lew Burrus | last post by:
Hello, I just installed sp2 for XP (on my development server), and tested my application: worked fine. Then installed sp1 for the 1.1 framework (as urged by Windows Update) and now this: the...
7
by: Mat | last post by:
Addin for outlook is have a problem with framework 1.1 and i need to go back to framework v1.0
2
by: Newsgroups MICROSOFT | last post by:
Hi, I've search a lot over the Internet and I've found many similar problems. The CurrentChanged event of the BindingManagerBase class DOESNT get fired when the application is working with...
2
by: manny | last post by:
Hi all asp.net experts Is it possible to have web applications working on framework 1.0 and 1.1 on the same machine? I have a web application which is compiled under 1.0 and thus must be run...
2
by: tuergeist | last post by:
Hi *, I searched for best practises for php apps, especially if you're using phpunit as testframework. I found nothing interesting, so I ask you, what do you think is a best practise on...
0
by: dhillarun | last post by:
Hi All, I have written some PHPUnit test code by using classes. test.php <?php require_once('PHPUnit/Framework.php'); include("hello.php"); class Test1 extends ...
0
by: gintare | last post by:
Command: phpunit -c app is not working under Symfony, Bitnami WAMP, Windows 7. I changed compose.json file in symfony project; C:\Bitnami\wampstack-5.4.38-0\sym_prog\myproject\composer.json...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.