Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Installation of vendor/bin/codecept goes wrong #20

Open
JustDoItSascha opened this issue Jul 17, 2015 · 6 comments
Open

Installation of vendor/bin/codecept goes wrong #20

JustDoItSascha opened this issue Jul 17, 2015 · 6 comments

Comments

@JustDoItSascha
Copy link

I've tried to install cakephp/codeception to a new project, but when I run codecept bootstrap it does not generate the folders and files like it should. They are in the "normal" codeception style and not your CakePHP style, e. g. camelCase....

So I assume, theres something wrong. When I look into codecept I see:

require_once dirname(FILE).'/autoload.php';

use Symfony\Component\Console\Application;

$app = new Application('Codeception', Codeception\Codecept::VERSION);
$app->add(new Codeception\Command\Build('build'));
$app->add(new Codeception\Command\Run('run'));
$app->add(new Codeception\Command\Console('console'));
$app->add(new Codeception\Command\Bootstrap('bootstrap'));
$app->add(new Codeception\Command\GenerateCept('generate:cept'));
$app->add(new Codeception\Command\GenerateCest('generate:cest'));
$app->add(new Codeception\Command\GenerateTest('generate:test'));
$app->add(new Codeception\Command\GeneratePhpUnit('generate:phpunit'));
$app->add(new Codeception\Command\GenerateSuite('generate:suite'));
$app->add(new Codeception\Command\GenerateHelper('generate:helper'));
$app->add(new Codeception\Command\GenerateScenarios('generate:scenarios'));
$app->add(new Codeception\Command\Clean('clean'));
$app->add(new Codeception\Command\GenerateGroup('generate:group'));
$app->add(new Codeception\Command\GeneratePageObject('generate:pageobject'));
$app->add(new Codeception\Command\GenerateStepObject('generate:stepobject'));
$app->run();

@JustDoItSascha
Copy link
Author

It seems, that the \Cake\Codeception\Console\Installer::customizeCodeceptionBinary() changes just the codecept file in vendor/codeception but it should change the codecept file in vendor/bin, should'nt it?

@lorenzo
Copy link
Member

lorenzo commented Jul 17, 2015

Seems like it should! Are you able to provide a pull request to fix this?

@JustDoItSascha
Copy link
Author

Yes, I can do that.

Another question: Do the normal cakephp fixtures work? Because when I try to use them like always, they are not loaded... Any ideas?

@jadb
Copy link
Contributor

jadb commented Jul 17, 2015

@JustDoItSascha - I can't remember if I was able (or even tried) to override the one in vendor/bin - but if you can, try it (maybe i just did not want to override their original one, can't remember really).

How are you using the fixtures?

@deizel
Copy link

deizel commented Jul 24, 2015

The files in vendor/bin are just symlinks, at least for me on OS X, so things work fine here:

$ ll vendor/bin/
vendor/bin/codecept -> ../codeception/codeception/codecept
phpunit -> ../phpunit/phpunit/phpunit

Make sure your app's Installer has this line, or check 2f76c02.. maybe these will give you some leads.

Can't comment on fixtures yet, but let us know if you had any luck.

@JustDoItSascha
Copy link
Author

Hi,
sorry that I couldn't answer at all, had a very busy time. But now I can focus on this project a bit again. So I reinstalled the package and see a very odd behavior:

You are right, the files in vendor/bin are symlinks; however when I open the symlink with nano I get the old version though the original file has been changed by the script.

I don't know why. I'm using Yosemite and never saw such a behavior nor did know it is possible at all...

Now is the question: Is it a problem on my side or in mac osx in general?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants