elcodi/test-common-bundle
Test Common Bundle is part of the Elcodi e-commerce suite of Symfony components and bundles under the MIT license. Read-only package; use the main elcodi/elcodi repository for issues, questions, and pull requests.
This is a test-support bundle, not a runtime dependency. Treat it as a dev-only utility that shipped alongside the Elcodi e-commerce suite around 2014.
Minimal steps:
composer require --dev elcodi/test-common-bundle
--dev; it should never appear in require.Test/ (or Tests/) directory in vendor/elcodi/test-common-bundle — that is where the abstract test-case classes and shared helpers live. There is effectively no public API beyond those classes.config_test.yml / AppKernel::registerBundles() test branch if it provides a test kernel or fixtures.Be realistic about scope: with 0 stars, 0 dependents, and a 2014 release, you are reading source rather than documentation. The elcodi.io/docs link and Gitter channel are the only references, and both likely assume the full elcodi/elcodi monorepo.
Subclass the base test case. The dominant pattern for this bundle is inheritance, not composition:
use Elcodi\TestCommonBundle\Test\AbstractWebTestCase; // verify actual FQCN in vendor/
class CartTest extends AbstractWebTestCase
{
public function testCartIsEmptyOnCreation()
{
$cart = $this->getService('elcodi.cart');
// ...
}
}
Use it inside the monorepo, not standalone. Because this is a subtree split, the intended workflow is: clone elcodi/elcodi, run the full test suite, and let this bundle supply shared bootstrap. If you are consuming Elcodi components in your own app, extend Elcodi's abstractions from the component's own Tests/ folder rather than pulling this bundle in.
Shared kernel provisioning. Typical helpers you can expect (check the source to confirm names) include:
test environment,getService() / container accessors,Integration pattern. Wire it together with PHPUnit via a bootstrap file that autoloads the vendor dir and starts the Elocdi test kernel once; the base class then reuses it across tests to avoid per-test kernel rebuilds.
elcodi/elcodi; this repo is regenerated from that subtree. Any local patch you make will be blown away on the next split.setUp() signatures, getMock() instead of createMock()). Installing on PHP 8 / Symfony 5+ will almost certainly fail or silently break.composer why-not elcodi/test-common-bundle and be prepared to add --ignore-platform-reqs or version pins. If resolution is painful, vendor the two or three abstract classes you actually need into your own tests/Support/ directory — given zero dependents and no maintenance, that is usually the cheaper path.AppKernel; a stray registerBundles() entry in the production kernel will fail on missing dev dependencies after composer install --no-dev.elcodi.cart, entity namespaces, etc.). If you are not using the full Elcodi stack, these classes will throw on missing services — there is no graceful degradation.phpunit --debug and check your bootstrap file first; most "class not found" errors here are an autoload/bootstrap mismatch rather than a bundle bug. Verify the actual namespace with grep -r "namespace" vendor/elcodi/test-common-bundle — the README gives no FQCNs.composer.json. If the base classes are thin, copying them is strictly better than depending on an unmaintained split.How can I help you explore Laravel packages today?