kurl/common

Kurl Ltd Common Library.

Installs: 78

Dependents: 0

Watchers: 1

Language: PHP

0.0.3 2014-03-17 16:54 UTC

README

Installation

Add the library to the repositories section of the target composer.json.

{
    "repositories": [
        {
            "type": "git",
            "url": "git@bitbucket.org:kurlltd/kurl-common.git"
        }
    ],
    "require": {
        "kurl/common": "0.0.*"
    }
}

Usage

Symfony ORM test cases

Extend WebTestCase and test as usual, the test case boots the kernel and uses the Symfony test configuration.

Example test configuration in your app/config_test.yml, uses an in-memory SQLite database. This will not be super fast as the schema is dropped an created every test case.

doctrine:
    dbal:
        driver: pdo_sqlite
        path: :memory:

Example test case

<?php

use Acme\Test\ORM;

class StubTest extends OrmTestCase
{
    /**
     * Tests the basics.
     */
    public function testExample()
    {
        $repo = $this->getEntityManager()->getRepository('AcmeBundle:User');
        $this->assertEquals(1, count($repo->findAll());
    }
}