Skip to content

Commit 35ce8cc

Browse files
committed
bug #509 #504 Move FixturesTrait class from Tests to AppBundle namespace (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
2 parents afc881f + 88fb877 commit 35ce8cc

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

tests/FixturesTrait.php renamed to src/AppBundle/DataFixtures/FixturesTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Tests;
12+
namespace AppBundle\DataFixtures;
1313

1414
/**
1515
* Helper class to create fixtures contents.

src/AppBundle/DataFixtures/ORM/PostFixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
namespace AppBundle\DataFixtures\ORM;
1313

14+
use AppBundle\DataFixtures\FixturesTrait;
1415
use AppBundle\Entity\Comment;
1516
use AppBundle\Entity\Post;
1617
use Doctrine\Common\DataFixtures\AbstractFixture;
1718
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
1819
use Doctrine\Common\Persistence\ObjectManager;
1920
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
2021
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
21-
use Tests\FixturesTrait;
2222

2323
/**
2424
* Defines the sample blog posts to load in the database before running the unit

src/AppBundle/DataFixtures/ORM/TagFixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace AppBundle\DataFixtures\ORM;
1313

14+
use AppBundle\DataFixtures\FixturesTrait;
1415
use AppBundle\Entity\Tag;
1516
use Doctrine\Common\DataFixtures\AbstractFixture;
1617
use Doctrine\Common\Persistence\ObjectManager;
17-
use Tests\FixturesTrait;
1818

1919
/**
2020
* Defines the sample blog tags to load in the database before running the unit

tests/AppBundle/Controller/Admin/BlogControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Tests\AppBundle\Controller\Admin;
1313

14+
use AppBundle\DataFixtures\FixturesTrait;
1415
use AppBundle\Entity\Post;
1516
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
1617
use Symfony\Component\HttpFoundation\Response;
17-
use Tests\FixturesTrait;
1818

1919
/**
2020
* Functional test for the controllers defined inside the BlogController used

tests/AppBundle/Controller/BlogControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Tests\AppBundle\Controller;
1313

14+
use AppBundle\DataFixtures\FixturesTrait;
1415
use AppBundle\Entity\Post;
1516
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
1617
use Symfony\Component\HttpFoundation\Response;
17-
use Tests\FixturesTrait;
1818

1919
/**
2020
* Functional test for the controllers defined inside BlogController.

0 commit comments

Comments
 (0)