Giter Club home page Giter Club logo

codeception's Introduction

CakePHP 3 Codeception Module

Build Status Software License

⚠️ This repository is archived and is no longer maintained.

A codeception module to test your CakePHP 3 powered application. Using Codeception with CakePHP opens up a whole new set of testing capabilities.

Front-end testing

(i.e. browser-based workflow tests)

Back-end testing

(i.e. direct, internal method tests)

Usage

From a CakePHP application, run the following from the command-line:

$ composer require --dev cakephp/codeception:dev-master && composer run-script post-install-cmd

If you are developing a plugin, add the post-install script to your composer.json first:

{
    "scripts": {
        "post-install-cmd": "Cake\\Codeception\\Console\\Installer::customizeCodeceptionBinary"
    }
}

Once installed, you can now run bootstrap which will create all the codeception required files in your application:

$ vendor/bin/codecept bootstrap

This creates the following files/folders in your app directory:

├── codeception.yml
├── src
│   └── TestSuite
│       └── Codeception
|           ├── AcceptanceTester.php
|           ├── FunctionalTester.php
|           ├── UnitTester.php
|           ├── Helper
│           │   ├── Acceptance.php
│           │   ├── Functional.php
│           │   └── Unit.php
|           └── _generated
|               └── .gitignore
└── tests
    ├── Acceptance.suite.yml
    ├── Functional.suite.yml
    ├── Unit.suite.yml
    ├── Acceptance
    │   └── bootstrap.php
    ├── Fixture
    │   └── dump.sql
    ├── Functional
    │   └── bootstrap.php
    └── Unit
        └── bootstrap.php

As you might have noticed, the CakePHP implementation differs in a couple things:

  • uses CamelCase suite names (Functional vs. functional)
  • uses bootstrap.php, no underscore prefix (vs. _bootstrap.php)
  • uses src/TestSuite/Codeception for custom modules (helpers) (vs. tests/_helpers)
  • uses tmp/tests to store logs (vs. tests/_logs)
  • uses tests/Fixture to fixture data (vs. tests/_data)
  • uses tests/Envs to fixture data (vs. tests/_envs)
  • adds a .gitignore to never track auto-generated files
  • adds custom templates for various generated files using the codecept binary

To better understand how Codeception tests work, please check the official documentation.

Example Cept

<?php
$I = new FunctionalTester($scenario);
$I->wantTo('ensure that adding a bookmark works');
$I->amOnPage('/bookmarks/add');
$I->see('Submit');
$I->submitForm('#add', [
    'title' => 'First bookmark',
]);
$I->seeInSession([
    'Flash'
]);

Actions

Auth

...

Config

Assert config key(/value) with seeInConfig($key, $value = null)

$I->seeInConfig('App.name'); // checks only that the key exists
$I->seeInConfig('App.name', 'CakePHP');
$I->seeInConfig(['App.name' => 'CakePHP']);

Assert no config key(/value) with dontSeeInConfig($key, $value = null)

$I->dontSeeInConfig('App.name'); // checks only that the key does not exist
$I->dontSeeInConfig('App.name', 'CakePHP');
$I->dontSeeInConfig(['App.name' => 'CakePHP']);

Db

Insert record with haveRecord($model, $data = [])

This is useful when you need a record for just one test (temporary fixture). It does not assert anything and returns the inserted record's ID.

$I->haveRecord('users', ['email' => '[email protected]', 'username' => 'jadb']);

Retrieve record with grabRecord($model, $conditions = [])

This is a wrapper around the Cake\ORM\Table::find('first') method.

$I->grabRecord('users', ['id' => '1']);

Assert record exists with seeRecord($model, $conditions = [])

This checks that the requested record does exist in the database.

$I->seeRecord('users', ['username' => 'jadb']);

Assert record does not exist with dontSeeRecord($model, $conditions = [])

This checks that the request record does not exist in the database.

$I->dontSeeRecord('users', ['email' => '[email protected]']);

Dispatcher

...

Miscellaneous

Load fixtures

In your Cest test case, write $fixutures property:

class AwesomeCest
{
    public $fixtures = [
        'app.users',
        'app.posts',
    ];

    // ...
}

You can use $autoFixtures, $dropTables property, and loadFixtures() method:

class AwesomeCest
{
    public $autoFixtures = false;
    public $dropTables = false;
    public $fixtures = [
        'app.users',
        'app.posts',
    ];

    public function tryYourSenario($I)
    {
        // load fixtures manually
        $I->loadFixtures('Users', 'Posts');
        // or load all fixtures
        $I->loadFixtures();
        // ...
    }
}

In your Cept test case, use $I->useFixtures() and $I->loadFixtures():

$I = new FunctionalTester($scenario);

// You should call `useFixtures` before `loadFixtures`
$I->useFixtures('app.users', 'app.posts');
// Then load fixtures manually
$I->loadFixtures('Users', 'Posts');
// or load all fixtures
$I->loadFixtures();

Assert CakePHP version with expectedCakePHPVersion($ver, $operator = 'ge')

$I->expectedCakePHPVersion('3.0.4');

Router

Open page by route with amOnRoute($route, $params = [])

All the below forms are equivalent:

$I->amOnRoute(['controller' => 'Posts', 'action' => 'add']);
$I->amOnRoute('addPost'); // assuming there is a route named `addPost`

Open page by action with amOnAction($action, $params = [])

All the below forms are equivalent:

$I->amOnAction('Posts@add');
$I->amOnAction('Posts.add');
$I->amOnAction('PostsController@add');
$I->amOnAction('PostsController.add');
$I->amOnAction('posts@add');
$I->amOnAction('posts.add');

Assert URL matches route with seeCurrentRouteIs($route, $params = [])

All the below forms are equivalent:

$I->seeCurrentRouteIs(['controller' => 'Posts', 'action' => 'add']);
$I->seeCurrentRouteIs('addPost'); // assuming there is a route named `addPost`

Assert URL matches action with seeCurrentActionIs($action, $params = [])

All the below forms are equivalent:

$I->seeCurrentActionIs('Posts@add');
$I->seeCurrentActionIs('Posts.add');
$I->seeCurrentActionIs('PostsController@add');
$I->seeCurrentActionIs('PostsController.add');
$I->seeCurrentActionIs('posts@add');
$I->seeCurrentActionIs('posts.add');

Session

Insert key/value(s) in session with haveInSession($key, $value = null)

$I->haveInSession('redirect', Router::url(['_name' => 'dashboard']));
$I->haveInSession(['redirect' => Router::url(['_name' => 'dashboard'])]);

Assert key(/value) in session with seeInSession($key, $value = null)

$I->seeInSession('redirect'); // only checks the key exists.
$I->seeInSession('redirect', Router::url(['_name' => 'dashboard']));
$I->seeInSession(['redirect', Router::url(['_name' => 'dashboard'])]);

Assert key(/value) not in session with dontSeeInSession($key, $value = null)

$I->dontSeeInSession('redirect'); // only checks the key does not exist.
$I->dontSeeInSession('redirect', Router::url(['_name' => 'dashboard']));
$I->dontSeeInSession(['redirect', Router::url(['_name' => 'dashboard'])]);

View

...

codeception's People

Contributors

cleptric avatar cwbit avatar dereuromark avatar jadb avatar josegonzalez avatar lorenzo avatar luke83 avatar markstory avatar nojimage avatar othercorey avatar peter279k avatar valentinarho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codeception's Issues

Installation of vendor/bin/codecept goes wrong

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();

Can't set http headers

I use REST module. (PhpBrower module same too.

$I->haveHttpHeader('Origin', 'http://foo.example');
$I->sendOPTIONS('/api/foo');

But, Can't get 'Origin' header in cakephp application.

Codeception Tests take 'default' datasource instead of 'test'

I use a ddev docker for running the tests. I'm able to run UnitTests via Codeception, but when it comes to database and fixtures its confusing...

My codeception.dist.yml

namespace: App\TestSuite\Codeception
paths:
    tests: tests
    output: tmp/tests
    data: tests/Fixture
    support: src/TestSuite/Codeception
    envs: tests/Envs
settings:
    bootstrap: bootstrap.php
    colors: true
    memory_limit: 1024M
actor_suffix: Tester
extensions:
    enabled:
        - Codeception\Extension\RunFailed
modules:
    config:
        Db:
            dsn: 'mysql:host=%DB_HOST_TEST%;dbname=%DB_NAME_TEST%'
            user: '%DB_USER_TEST%'
            password: '%DB_PASSWORD_TEST%'
            dump: tests/_data/dump.sql
            cleanup: true # reload dump between tests
            populate: true # load dump before all tests
            reconnect: true
    enabled:
        - Db
params:
    - env

The dump.sql is imported into the test database on running my tests. Fixtures are not inserted...

Then in my Test "class HashableBehaviorTest extends \Codeception\Test\Unit" I do something like:
$user = $this->UsersTable->get(1);
This gives me the first record from my default database and not from the test database. I have no Idea what is missing here... Glad for any help!

Updating to codeception 2.3

Is there any interest in updating this to the 2.3 release? I don't see much activity here but now that the framework supports PHPUnit 6 this plugin is broken.

Is there a Cake 2.x option?

Legacy project with Cake 2.x
Is there a backwards compatibility option?
Is there a similar library for CakePHP 2.x?

Update README - customizeCodeceptionBinary part of skeleton app Installer

The customizeCodeceptionBinary is now added to the official app skeleton - refs cakephp/app/pull/223.

I think the doc should be somehow updated so that people are not surprised when they already see the customizeCodeceptionBinary method there. Or since everything is just in pre-release there is no need to have those lines in the top of the README file. Possibly there could be an Fix issues section on the bottom and this could be mentioned there.

Anyway I just wanted to let you know that there is cakephp/app/pull/223.

Broken with cakephp 3.6

I recently upgraded to cake 3.6 and all my tests are broken.

  • Routes are not loaded at runtime, amOnRoute cannot be used(nothing is found). [Cake\Routing\Exception\MissingRouteException] A route matching "array (...
  • Router::reload(); in reloadRoutes can result in 'duplicate routes' errors. see cakephp/app#593
  • Lots of deprecated errors. Event::$data is deprecated. Use Event::getData() instead. eventManager() is deprecated. Use getEventManager()/setEventManager() instead. etc..

Compatibility problem with symfony/browser-kit v2.8.7

There is a compatibility problem with the package symfony/browser-kit v2.8.7 resulting into the error

Declaration of Cake\Codeception\Connector::filterRequest($request) should be compatible with Symfony\Component\BrowserKit\Client::filterRequest(Symfony\Component\BrowserKit\Request $request)

to solve it is necessary to update the declaration of the method

protected function filterRequest($request)

within the file src/Connector.php and change to

protected function filterRequest(\Symfony\Component\BrowserKit\Request $request)

Fatal Error undefined function loadPHPUnitAliases()

I installed codeception plugin via composer and created a simple Acceptance test. Then I try to run the test and get the following error

` vendor/bin/codecept run
Codeception PHP Testing Framework v2.3.9
Powered by PHPUnit 6.5.13 by Sebastian Bergmann and contributors.

App\TestSuite\Codeception.Acceptance Tests (1) -----------------------------------------------------------------------------
✔ SigninCest: Try to test (0.00s)

PHP Fatal error: Uncaught Error: Call to undefined function Cake\TestSuite\Fixture\loadPHPUnitAliases() in /var/www/html/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php:17
Stack trace:
#0 /var/www/html/vendor/composer/ClassLoader.php(444): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/html/v...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Cake\TestSuite\...')
#3 /var/www/html/vendor/cakephp/codeception/src/Helper/FixtureTrait.php(48): spl_autoload_call('Cake\TestSuite\...')
#4 /var/www/html/vendor/cakephp/codeception/src/Framework.php(40): Cake\Codeception\Framework->loadFixtureManager()
#5 /var/www/html/vendor/codeception/codeception/src/Codeception/SuiteManager.php(80): Cake\Codeception\Framework->_initialize()
#6 /var/www/html/vendor/codeception/codeception/src/Codeception/Codecept.php(187): Codeception\SuiteManager->initialize()
#7 /var/www/html/vendor/codeception/codeception/src/Codeception/Codecept.php(158): Codeception in /var/www/html/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php on line 17

Fatal error: Uncaught Error: Call to undefined function Cake\TestSuite\Fixture\loadPHPUnitAliases() in /var/www/html/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php:17
Stack trace:
#0 /var/www/html/vendor/composer/ClassLoader.php(444): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/html/v...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Cake\TestSuite\...')
#3 /var/www/html/vendor/cakephp/codeception/src/Helper/FixtureTrait.php(48): spl_autoload_call('Cake\TestSuite\...')
#4 /var/www/html/vendor/cakephp/codeception/src/Framework.php(40): Cake\Codeception\Framework->loadFixtureManager()
#5 /var/www/html/vendor/codeception/codeception/src/Codeception/SuiteManager.php(80): Cake\Codeception\Framework->_initialize()
#6 /var/www/html/vendor/codeception/codeception/src/Codeception/Codecept.php(187): Codeception\SuiteManager->initialize()
#7 /var/www/html/vendor/codeception/codeception/src/Codeception/Codecept.php(158): Codeception in /var/www/html/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php on line 17

FATAL ERROR. TESTS NOT FINISHED.
Uncaught Error: Call to undefined function Cake\TestSuite\Fixture\loadPHPUnitAliases() in /var/www/html/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php:17
Stack trace:
#0 /var/www/html/vendor/composer/ClassLoader.php(444): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/html/v...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Cake\TestSuite\...')
#3 /var/www/html/vendor/cakephp/codeception/src/Helper/FixtureTrait.php(48): spl_autoload_call('Cake\TestSuite\...')
#4 /var/www/html/vendor/cakephp/codeception/src/Framework.php(40): Cake\Codeception\Framework->loadFixtureManager()
#5 /var/www/html/vendor/codeception/codeception/src/Codeception/SuiteManager.php(80): Cake\Codeception\Framework->_initialize()
#6 /var/www/html/vendor/codeception/codeception/src/Codeception/Codecept.php(187): Codeception\SuiteManager->initialize()
#7 /var/www/html/vendor/codeception/codeception/src/Codeception/Codecept.php(158): Codeception
in /var/www/html/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php:17
`

Did I missed anything?
Greetings

Bootstrap created unexpected folder structure

The bootstrap command created this folder structure for me
image
which is different from what stated in the README file. Using Windows 7, PHP 5.6

My composer.json:

    "autoload": {
        "psr-4": {
            "App\\": "src",
            "App\\Test\\": "tests"
        }
    },
    "scripts": {
        "post-install-cmd": "App\\Console\\Installer::postInstall",
        "post-autoload-dump": [
            "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump",
            "Cake\\Codeception\\Console\\Installer::postAutoloadDump"
        ]
    }

Error Constant already defined

When I run all suites at once (vendor/bin/codecept run), I get a PHPUnit_Framework_Exception about constant already defined.
First phpunit complainded about all constants defined in config/path.php, then I wrapped all of them inside 'conditionals definitions'. But the error keeps going through every constant.

When I run one suit at time, I have no problems.

Cakephp 2.x

Is there any plan to port this module to Cake 2.x?

Or is there an alternative module for Cake 2.x?

Don't get fixtures in unit testing running

Hi jadb!

I'm struggling very hard with fixtures in unit testing.

I have my Testclass extend from Cake\TestSuite\TestCase. But when I try it with

public $fixtures = ['plugin.user_management.permissions'];

no fixtures are loaded. When I try

public function testAuthorize()
{
    $this->loadFixtures('Permissions');
...

I get an Exception: [PHPUnit_Framework_ExceptionWrapper] No fixture manager to load the test fixture

So how can I use the built in fixture functionality from cake in unit testing? Any ideas?

Documentation - how to prepare database

Could you please explain (also in documentation) how should I prepare the database?

I would like to run the tests also on third party continous integration tool like https://codeship.com

Where/how should I prepare the data and schema? Or is it connected with cake's fixtures?

In Rails I am able to load the schema bundle exec rake db:schema:load. In cake there is no schema lock file, but in the fixtures it can be defined from scratch or copied from existing database. But on third party server this is not handy because there is no existing database.
This schema lock file could be refreshed after every migration. This is how it works in Rails if I'm correct.

What do you think and how would you solve this? Thanks alot.

Can't install with composer

Executed:
composer require --dev cakephp/codeception:dev-master

Get:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - cakephp/codeception dev-master requires codeception/codeception ~2.0.16 -> satisfiable by codeception/codeception[2.0.16].
    - Installation request for cakephp/codeception dev-master -> satisfiable by cakephp/codeception[dev-master].
    - Conclusion: remove symfony/console v3.1.5
    - Conclusion: don't install symfony/console v3.1.5
    - codeception/codeception 2.0.16 requires symfony/console ~2.4 -> satisfiable by symfony/console[v2.4.0, v2.4.0-BETA1, v2.4.0-BETA2, v2.4.0-RC1, v2.4.1, v2.4.10, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.5.0, v2.5.0-BETA1, v2.5.0-BETA2, v2.5.0-RC1, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.0-BETA1, v2.6.0-BETA2, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.13, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.0-BETA1, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9].
    - Can only install one of: symfony/console[v2.8.0, v3.1.5].
    - Can only install one of: symfony/console[v2.8.0-BETA1, v3.1.5].
    - Can only install one of: symfony/console[v2.8.1, v3.1.5].
    - Can only install one of: symfony/console[v2.8.10, v3.1.5].
    - Can only install one of: symfony/console[v2.8.11, v3.1.5].
    - Can only install one of: symfony/console[v2.8.12, v3.1.5].
    - Can only install one of: symfony/console[v2.8.2, v3.1.5].
    - Can only install one of: symfony/console[v2.8.3, v3.1.5].
    - Can only install one of: symfony/console[v2.8.4, v3.1.5].
    - Can only install one of: symfony/console[v2.8.5, v3.1.5].
    - Can only install one of: symfony/console[v2.8.6, v3.1.5].
    - Can only install one of: symfony/console[v2.8.7, v3.1.5].
    - Can only install one of: symfony/console[v2.8.8, v3.1.5].
    - Can only install one of: symfony/console[v2.8.9, v3.1.5].
    - Can only install one of: symfony/console[v2.4.0, v3.1.5].
    - Can only install one of: symfony/console[v2.4.0-BETA1, v3.1.5].
    - Can only install one of: symfony/console[v2.4.0-BETA2, v3.1.5].
    - Can only install one of: symfony/console[v2.4.0-RC1, v3.1.5].
    - Can only install one of: symfony/console[v2.4.1, v3.1.5].
    - Can only install one of: symfony/console[v2.4.10, v3.1.5].
    - Can only install one of: symfony/console[v2.4.2, v3.1.5].
    - Can only install one of: symfony/console[v2.4.3, v3.1.5].
    - Can only install one of: symfony/console[v2.4.4, v3.1.5].
    - Can only install one of: symfony/console[v2.4.5, v3.1.5].
    - Can only install one of: symfony/console[v2.4.6, v3.1.5].
    - Can only install one of: symfony/console[v2.4.7, v3.1.5].
    - Can only install one of: symfony/console[v2.4.8, v3.1.5].
    - Can only install one of: symfony/console[v2.4.9, v3.1.5].
    - Can only install one of: symfony/console[v2.5.0, v3.1.5].
    - Can only install one of: symfony/console[v2.5.0-BETA1, v3.1.5].
    - Can only install one of: symfony/console[v2.5.0-BETA2, v3.1.5].
    - Can only install one of: symfony/console[v2.5.0-RC1, v3.1.5].
    - Can only install one of: symfony/console[v2.5.1, v3.1.5].
    - Can only install one of: symfony/console[v2.5.10, v3.1.5].
    - Can only install one of: symfony/console[v2.5.11, v3.1.5].
    - Can only install one of: symfony/console[v2.5.12, v3.1.5].
    - Can only install one of: symfony/console[v2.5.2, v3.1.5].
    - Can only install one of: symfony/console[v2.5.3, v3.1.5].
    - Can only install one of: symfony/console[v2.5.4, v3.1.5].
    - Can only install one of: symfony/console[v2.5.5, v3.1.5].
    - Can only install one of: symfony/console[v2.5.6, v3.1.5].
    - Can only install one of: symfony/console[v2.5.7, v3.1.5].
    - Can only install one of: symfony/console[v2.5.8, v3.1.5].
    - Can only install one of: symfony/console[v2.5.9, v3.1.5].
    - Can only install one of: symfony/console[v2.6.0, v3.1.5].
    - Can only install one of: symfony/console[v2.6.0-BETA1, v3.1.5].
    - Can only install one of: symfony/console[v2.6.0-BETA2, v3.1.5].
    - Can only install one of: symfony/console[v2.6.1, v3.1.5].
    - Can only install one of: symfony/console[v2.6.10, v3.1.5].
    - Can only install one of: symfony/console[v2.6.11, v3.1.5].
    - Can only install one of: symfony/console[v2.6.12, v3.1.5].
    - Can only install one of: symfony/console[v2.6.13, v3.1.5].
    - Can only install one of: symfony/console[v2.6.2, v3.1.5].
    - Can only install one of: symfony/console[v2.6.3, v3.1.5].
    - Can only install one of: symfony/console[v2.6.4, v3.1.5].
    - Can only install one of: symfony/console[v2.6.5, v3.1.5].
    - Can only install one of: symfony/console[v2.6.6, v3.1.5].
    - Can only install one of: symfony/console[v2.6.7, v3.1.5].
    - Can only install one of: symfony/console[v2.6.8, v3.1.5].
    - Can only install one of: symfony/console[v2.6.9, v3.1.5].
    - Can only install one of: symfony/console[v2.7.0, v3.1.5].
    - Can only install one of: symfony/console[v2.7.0-BETA1, v3.1.5].
    - Can only install one of: symfony/console[v2.7.0-BETA2, v3.1.5].
    - Can only install one of: symfony/console[v2.7.1, v3.1.5].
    - Can only install one of: symfony/console[v2.7.10, v3.1.5].
    - Can only install one of: symfony/console[v2.7.11, v3.1.5].
    - Can only install one of: symfony/console[v2.7.12, v3.1.5].
    - Can only install one of: symfony/console[v2.7.13, v3.1.5].
    - Can only install one of: symfony/console[v2.7.14, v3.1.5].
    - Can only install one of: symfony/console[v2.7.15, v3.1.5].
    - Can only install one of: symfony/console[v2.7.16, v3.1.5].
    - Can only install one of: symfony/console[v2.7.17, v3.1.5].
    - Can only install one of: symfony/console[v2.7.18, v3.1.5].
    - Can only install one of: symfony/console[v2.7.19, v3.1.5].
    - Can only install one of: symfony/console[v2.7.2, v3.1.5].
    - Can only install one of: symfony/console[v2.7.3, v3.1.5].
    - Can only install one of: symfony/console[v2.7.4, v3.1.5].
    - Can only install one of: symfony/console[v2.7.5, v3.1.5].
    - Can only install one of: symfony/console[v2.7.6, v3.1.5].
    - Can only install one of: symfony/console[v2.7.7, v3.1.5].
    - Can only install one of: symfony/console[v2.7.8, v3.1.5].
    - Can only install one of: symfony/console[v2.7.9, v3.1.5].
    - Installation request for symfony/console (locked at v3.1.5) -> satisfiable by symfony/console[v3.1.5].


Installation failed, reverting ./composer.json to its original content.

composer.json:

{
    "name": "cakephp/app",
    "description": "CakePHP skeleton app",
    "homepage": "http://cakephp.org",
    "type": "project",
    "license": "MIT",
    "require": {
        "php": ">=5.5.9",
        "cakephp/cakephp": "3.3.*",
        "mobiledetect/mobiledetectlib": "2.*",
        "cakephp/migrations": "~1.0",
        "cakephp/plugin-installer": "*",
        "friendsofcake/crud": "^4.3",
        "fzaninotto/faker": "^1.6",
        "almasaeed2010/adminlte": "~2.0",
        "friendsofcake/bootstrap-ui": "^0.5.1"
    },
    "require-dev": {
        "psy/psysh": "@stable",
        "cakephp/debug_kit": "~3.2",
        "cakephp/bake": "~1.1"
    },
    "suggest": {
        "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
        "phpunit/phpunit": "Allows automated tests to be run without system-wide install.",
        "cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."
    },
    "autoload": {
        "psr-4": {
            "App\\": "src"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Test\\": "tests",
            "Cake\\Test\\": "./vendor/cakephp/cakephp/tests"
        }
    },
    "scripts": {
        "post-install-cmd": "App\\Console\\Installer::postInstall",
        "post-create-project-cmd": "App\\Console\\Installer::postInstall",
        "post-autoload-dump": [
            "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump",
            "cp -rf vendor/almasaeed2010/adminlte webroot/"
        ]
    },
    "minimum-stability": "beta",
    "prefer-stable": true
}
  • PHP 7.0.12
  • Cake 3.3.6

Wrong codeception composer dependency

The dependency 2.0.* wihin the composer.json file is resolved into tag 2.0.0-RC of the codeception repository.
I think it could be better to specify 2.0.16 that is, at this moment, the most recent tag related to 2.0.* version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.