Download the PHP package silinternational/yii2-codeception without Composer

On this page you can find all versions of the php package silinternational/yii2-codeception. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-codeception

yii2-codeception

Patches to implement nice features of yii2-codeception since it was abandoned

What / Why

We've been developing with Yii2 for a couple years now and have several projects using the yiisoft/yii2-codeception library for unit tests.
This library has been deprecated in favor of using a Codeception module.

Unfortunately this module requires quite a bit of refactoring to run tests in a simlar way as yii2-codeception allowed.

After a few hours of tracing and debugging we figured out that two main things had changed that we depended on and so we decided to create a standalone repo to bring in the needed features.

Loading fixtures into database

The first thing we found was that after reconfiguring Codeception to use the Yii2 module, to look like:

Running tests it was unable to load the fixtures due to foreign key constraints. We created a new base class for our active record classes that beforeLoad and afterLoad it will disable and enable foreign key constraints respectively.

This new base class is Sil\yii\test\ActiveFixture. To use, simply update your fixture files to extend from it instead of the previous yii\test\ActiveFixture class.

Example fixtures class

Accessing fixtures from test case

After getting fixtures to load properly into the database we found we could not access them in the way we were used to. With yii2-codeception, within a test function we could call $this->fixtureType('fixtureName') to access a specific fixture record. After migrating to using Codeception\TestCase\Test as our unit test base class instead of yii\codeception\DbTestCase we got fatal errors about the method fixtureType does not exist on the object. When using the Yii2 Codeception module you access fixtures by calling $this->tester->grabFixture('fixtureType', 'fixtureName'). So to work around this we created a new base class for our tests that implements the __call() magic method to take the method name and argument and pass them to the new $this->tester->grabFixture() method. You can use this by updating your unit tests to extend Sil\Codeception\TestCase\Test instead of Codeception\TestCase\Test.

Example test case file


All versions of yii2-codeception with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
yiisoft/yii2 Version ^2.0.5
codeception/codeception Version >=2.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package silinternational/yii2-codeception contains the following files

Loading the files please wait ....