Skip to content

Commit

Permalink
bug #509 #504 Move FixturesTrait class from Tests to AppBundle namesp…
Browse files Browse the repository at this point in the history
…ace (apetitpa, javiereguiluz)

This PR was merged into the master branch.

Discussion
----------

#504 Move FixturesTrait class from Tests to AppBundle namespace

Moved the FixturesTrait class to the AppBundle namespace in attempt to fix the heroku deployment failure. This class is needed not only in dev or test environments but also in production because the database is loaded using the doctrine fixtures bundle. Related to #504

Commits
-------

88fb877 Merge branch 'master' into fix-#504-heroku
7d2ce92 #504 Move FixturesTrait class from Tests to AppBundle namespace
  • Loading branch information
javiereguiluz committed Mar 15, 2017
2 parents afc881f + 88fb877 commit 35ce8cc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Tests;
namespace AppBundle\DataFixtures;

/**
* Helper class to create fixtures contents.
Expand Down
2 changes: 1 addition & 1 deletion src/AppBundle/DataFixtures/ORM/PostFixtures.php
Expand Up @@ -11,14 +11,14 @@

namespace AppBundle\DataFixtures\ORM;

use AppBundle\DataFixtures\FixturesTrait;
use AppBundle\Entity\Comment;
use AppBundle\Entity\Post;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Tests\FixturesTrait;

/**
* Defines the sample blog posts to load in the database before running the unit
Expand Down
2 changes: 1 addition & 1 deletion src/AppBundle/DataFixtures/ORM/TagFixtures.php
Expand Up @@ -11,10 +11,10 @@

namespace AppBundle\DataFixtures\ORM;

use AppBundle\DataFixtures\FixturesTrait;
use AppBundle\Entity\Tag;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\Persistence\ObjectManager;
use Tests\FixturesTrait;

/**
* Defines the sample blog tags to load in the database before running the unit
Expand Down
2 changes: 1 addition & 1 deletion tests/AppBundle/Controller/Admin/BlogControllerTest.php
Expand Up @@ -11,10 +11,10 @@

namespace Tests\AppBundle\Controller\Admin;

use AppBundle\DataFixtures\FixturesTrait;
use AppBundle\Entity\Post;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
use Tests\FixturesTrait;

/**
* Functional test for the controllers defined inside the BlogController used
Expand Down
2 changes: 1 addition & 1 deletion tests/AppBundle/Controller/BlogControllerTest.php
Expand Up @@ -11,10 +11,10 @@

namespace Tests\AppBundle\Controller;

use AppBundle\DataFixtures\FixturesTrait;
use AppBundle\Entity\Post;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
use Tests\FixturesTrait;

/**
* Functional test for the controllers defined inside BlogController.
Expand Down

0 comments on commit 35ce8cc

Please sign in to comment.