afup / aperophp

Nouvelle version du site aperophp.net
aperophp.net
21 stars 16 forks source link

[Insight] Include statements should not be used #115

Closed mikaelrandy closed 8 years ago

mikaelrandy commented 11 years ago

in src/Aperophp/Test/Test.php, line 12

Using include() or require() bypasses lazy-loading of third-party classes. Prefer using autoloading.

class Test extends atoum\test
{
    public function beforeTestMethod($method)
    {
        $this->app = require __DIR__.'/../../../app/app.php';
        require __DIR__.'/../../../app/config_test.php';

        // Isolate DB
        $this->app['db']->beginTransaction();
    }

Posted from SensioLabsInsight