diff --git a/.gitignore b/.gitignore index 31f9b0b..cc7c2c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -tests/Resources/app/cache -tests/Resources/app/logs +tests/Fixtures/App/var/cache +tests/Fixtures/App/var/logs +!tests/Fixtures/App/var/.gitempty composer.lock vendor diff --git a/.travis.yml b/.travis.yml index d76cbf4..9bd7838 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,39 +26,33 @@ cache: - $HOME/.composer/cache/files env: - matrix: SYMFONY_VERSION=3.4 + matrix: SYMFONY_VERSION=4.0.* global: - - SYMFONY_DEPRECATIONS_HELPER=48 + - SYMFONY_DEPRECATIONS_HELPER=0 - SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" + - KERNEL_CLASS=Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Kernel - SYMFONY_PHPUNIT_VERSION=5.7 - TEST_INSTALLATION=false matrix: include: - php: 7.1 - env: SYMFONY_VERSION=3.4.* + env: STABILITY=dev SYMFONY_VERSION=4.0.* - php: 7.1 - env: DEPS=dev SYMFONY_VERSION=3.3.* - - php: 7.0 - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak + env: STABILITY=dev COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.1 - env: SYMFONY_VERSION=3.1.* + env: STABILITY=dev SYMFONY_VERSION=3.3.* - php: 7.1 - env: SYMFONY_VERSION=3.2.* + env: STABILITY=dev SYMFONY_VERSION=3.4.* - env: TEST_INSTALLATION=true - fast_finish: true allow_failures: - - php: 7.1 - env: SYMFONY_VERSION=3.4.* - env: TEST_INSTALLATION=true - before_install: - - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi - phpenv config-rm xdebug.ini || true - composer self-update - - if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; composer config prefer-stable true; fi; - if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) diff --git a/Makefile b/Makefile index 14b4833..1b1c030 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ ifdef BRANCH VERSION=dev-${BRANCH} endif PACKAGE=symfony-cmf/sonata-phpcr-admin-integration-bundle - +export KERNEL_CLASS=Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Kernel list: @echo 'test: will run all tests' @echo 'unit_tests: will run unit tests only' diff --git a/README.md b/README.md index 671cdd2..974b1a7 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ under the [MIT License](LICENSE). ## Requirements -* PHP 7.0 / 7.1 -* Symfony 2.8 / 3.1 / 3.2 / 3.3 +* PHP 7.1 +* Symfony 2.8 / 3.3 / 3.4 / 4.0 * See also the `require` section of [composer.json](composer.json) ## Documentation @@ -41,7 +41,7 @@ For general support and questions, please use [StackOverflow](http://stackoverfl ## Contributing Pull requests are welcome. Please see our -[CONTRIBUTING](https://github.com/symfony-cmf/symfony-cmf/blob/master/CONTRIBUTING.md) +[CONTRIBUTING](https://github.com/symfony-cmf/blob/master/CONTRIBUTING.md) guide. Unit and/or functional tests exist for this package. See the diff --git a/composer.json b/composer.json index 38f3d50..121c780 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,11 @@ "name": "symfony-cmf/sonata-phpcr-admin-integration-bundle", "type": "symfony-bundle", "description": "Symfony CMF sonata admin implementations", - "keywords": ["Symfony CMF", "Sonata", "Admin"], + "keywords": [ + "Symfony CMF", + "Sonata", + "Admin" + ], "homepage": "http://cmf.symfony.com", "license": "MIT", "authors": [ @@ -12,31 +16,32 @@ } ], "require": { - "php": "^5.6|^7.0", - "symfony/framework-bundle": "^2.8|^3.0", - "sonata-project/doctrine-phpcr-admin-bundle": "^2.0.0-RC4", + "php": "^7.1", + "symfony/framework-bundle": "^2.8 || ^3.3 || ^4.0", + "sonata-project/doctrine-phpcr-admin-bundle": "^2.1", "sonata-project/admin-bundle": "^3.6.0", "symfony-cmf/tree-browser-bundle": "^2.0" }, "require-dev": { - "symfony-cmf/testing": "^2.1@dev", - "symfony-cmf/core-bundle": "^2.0", - "symfony-cmf/routing-bundle": "^2.0", - "symfony-cmf/seo-bundle": "^2.0", - "symfony-cmf/menu-bundle": "^2.0", - "symfony-cmf/block-bundle": "^2.0", - "symfony-cmf/content-bundle": "^2.0", + "symfony-cmf/testing": "^2.1", + "symfony-cmf/core-bundle": "^2.1", + "symfony-cmf/routing-bundle": "^2.1", + "symfony-cmf/seo-bundle": "^2.1", + "symfony-cmf/menu-bundle": "^2.1", + "symfony-cmf/block-bundle": "^2.1", + "symfony-cmf/content-bundle": "^2.1", "doctrine/orm": "^2.4", - "doctrine/phpcr-odm": "^2.0", + "doctrine/phpcr-odm": "^1.4|^2.0", "doctrine/doctrine-bundle": "^1.3", - "symfony/phpunit-bridge": "^3.2", - "matthiasnoback/symfony-dependency-injection-test": "~0.6", - "matthiasnoback/symfony-config-test": "^1.3.1", + "symfony/phpunit-bridge": "^3.3 || ^4.0", + "matthiasnoback/symfony-dependency-injection-test": "^1.1", + "matthiasnoback/symfony-config-test": "^2.1", "burgov/key-value-form-bundle": "^1.0", - "egeloen/ckeditor-bundle": "^4.0" + "egeloen/ckeditor-bundle": "^4.0", + "symfony/asset": "^2.8 || ^3.3 || ^4.0", + "symfony/browser-kit": "^2.8 || ^3.3 || ^4.0", + "symfony/css-selector": "^2.8 || ^3.3 || ^4.0" }, - "minimum-stability": "dev", - "prefer-stable": true, "suggest": { "symfony-cmf/routing-bundle": "To make use of the alternate locale provider.", "doctrine/phpcr-bundle": "To persist the metadata in PHPCR ODM documents", @@ -46,7 +51,11 @@ }, "autoload": { "psr-4": { - "Symfony\\Cmf\\Bundle\\SonataPhpcrAdminIntegrationBundle\\": "src/", + "Symfony\\Cmf\\Bundle\\SonataPhpcrAdminIntegrationBundle\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { "Symfony\\Cmf\\Bundle\\SonataPhpcrAdminIntegrationBundle\\Tests\\": "tests/" } }, @@ -54,5 +63,9 @@ "branch-alias": { "dev-master": "1.1-dev" } + }, + "conflict": { + "sebastian/environment": "<1.3.4", + "sebastian/exporter": "<2.0.0" } } diff --git a/src/Admin/Menu/MenuAdmin.php b/src/Admin/Menu/MenuAdmin.php index 64a27ed..4a4f46c 100644 --- a/src/Admin/Menu/MenuAdmin.php +++ b/src/Admin/Menu/MenuAdmin.php @@ -32,7 +32,7 @@ protected function configureFormFields(FormMapper $formMapper) ->tab('form.tab_general') ->with('form.group_items', ['class' => 'col-md-6']) ->add('children', TreeManagerType::class, [ - 'root' => $this->menuRoot, + 'root' => $subject->getId(), 'edit_in_overlay' => false, 'create_in_overlay' => false, 'delete_in_overlay' => false, diff --git a/src/Description/SonataEnhancer.php b/src/Description/SonataEnhancer.php index 3fc9da6..38cff19 100644 --- a/src/Description/SonataEnhancer.php +++ b/src/Description/SonataEnhancer.php @@ -41,6 +41,14 @@ class SonataEnhancer implements DescriptionEnhancerInterface private $adminMap = []; + private static $linkKeyMapping = [ + 'list' => Descriptor::LINK_LIST_HTML, + 'create' => Descriptor::LINK_CREATE_HTML, + 'edit' => Descriptor::LINK_EDIT_HTML, + 'delete' => Descriptor::LINK_REMOVE_HTML, + 'show' => Descriptor::LINK_SHOW_HTML, + ]; + /** * @param Pool $pool * @param UrlGeneratorInterface $urlGenerator @@ -62,8 +70,6 @@ public function enhance(Description $description) $class = ClassUtils::getClass($object); $admin = $this->getAdminByClass($class); - $links = []; - $routeCollection = $admin->getRoutes(); foreach ($routeCollection->getElements() as $code => $route) { @@ -72,34 +78,10 @@ public function enhance(Description $description) $admin->getIdParameter() => $admin->getUrlsafeIdentifier($object), ], true); - $routeRole = substr($code, strlen($admin->getCode()) + 1); - - $links[$routeRole] = $url; - } - - if (isset($links['list'])) { - $description->set('list', $links['list']); - unset($links['list']); - } - - if (isset($links['create'])) { - $description->set(Descriptor::LINK_CREATE_HTML, $links['create']); - unset($links['create']); - } - - if (isset($links['edit'])) { - $description->set(Descriptor::LINK_EDIT_HTML, $links['edit']); - unset($links['edit']); - } - - if (isset($links['delete'])) { - $description->set(Descriptor::LINK_REMOVE_HTML, $links['delete']); - unset($links['delete']); - } - - if (isset($links['show'])) { - $description->set(Descriptor::LINK_SHOW_HTML, $links['show']); - unset($links['show']); + $linkKey = trim($code, '.)'); + if (array_key_exists($linkKey, self::$linkKeyMapping)) { + $description->set(self::$linkKeyMapping[$linkKey], $url); + } } $description->set(Descriptor::PAYLOAD_TITLE, $admin->toString($object)); diff --git a/src/Resources/config/block-menu.xml b/src/Resources/config/block-menu.xml index c342c6b..67051be 100644 --- a/src/Resources/config/block-menu.xml +++ b/src/Resources/config/block-menu.xml @@ -8,7 +8,8 @@ + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + class="Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Admin\Block\Extension\BlockCacheExtension" + public="true"> %cmf_sonata_phpcr_admin_integration.block.extension.block_cache.form_group% %cmf_sonata_phpcr_admin_integration.block.extension.block_cache.form_tab% @@ -17,7 +18,8 @@ + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + public="true"> + public="true"> %cmf_sonata_phpcr_admin_integration.core.extension.publishable.form_group% %cmf_sonata_phpcr_admin_integration.core.extension.publishable.form_tab% @@ -25,7 +25,7 @@ + public="true"> %cmf_sonata_phpcr_admin_integration.core.extension.publish_time.form_group% %cmf_sonata_phpcr_admin_integration.core.extension.publish_time.form_tab% diff --git a/src/Resources/config/menu.xml b/src/Resources/config/menu.xml index 67615b8..c6f182e 100644 --- a/src/Resources/config/menu.xml +++ b/src/Resources/config/menu.xml @@ -9,7 +9,8 @@ + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + class="Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Admin\Menu\Extension\MenuNodeReferrersExtension" + public="true"> %cmf_sonata_phpcr_admin_integration.menu.extension.menu_node_referrers.form_group% %cmf_sonata_phpcr_admin_integration.menu.extension.menu_node_referrers.form_tab% @@ -80,7 +83,8 @@ + class="Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Admin\Menu\Extension\MenuOptionsExtension" + public="true"> %cmf_sonata_phpcr_admin_integration.menu.extension.menu_options.form_group% %cmf_sonata_phpcr_admin_integration.menu.extension.menu_options.form_tab% %cmf_sonata_phpcr_admin_integration.menu.extension.menu_options.advanced% diff --git a/src/Resources/config/routing.xml b/src/Resources/config/routing.xml index 58cd171..19dec42 100644 --- a/src/Resources/config/routing.xml +++ b/src/Resources/config/routing.xml @@ -8,7 +8,8 @@ + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + parent="cmf_sonata_phpcr_admin_integration.abstract_admin" + public="true"> + class="Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Admin\Routing\Extension\RouteReferrersExtension" + public="true"> %cmf_sonata_phpcr_admin_integration.routing.extension.referrers.from_group% %cmf_sonata_phpcr_admin_integration.routing.extension.referrers.from_tab% @@ -67,7 +70,8 @@ + class="Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Admin\Routing\Extension\FrontendLinkExtension" + public="true"> diff --git a/src/Resources/config/seo.xml b/src/Resources/config/seo.xml index 6741888..d9c367d 100644 --- a/src/Resources/config/seo.xml +++ b/src/Resources/config/seo.xml @@ -7,7 +7,8 @@ + class="Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Admin\Seo\Extension\SeoContentAdminExtension" + public="true"> %cmf_sonata_phpcr_admin_integration.seo.extension.metadata.form_group% %cmf_sonata_phpcr_admin_integration.seo.extension.metadata.form_tab% diff --git a/tests/Resources/Admin/BaseAdmin.php b/tests/Fixtures/App/Admin/BaseAdmin.php similarity index 98% rename from tests/Resources/Admin/BaseAdmin.php rename to tests/Fixtures/App/Admin/BaseAdmin.php index e955ec1..3db1faf 100644 --- a/tests/Resources/Admin/BaseAdmin.php +++ b/tests/Fixtures/App/Admin/BaseAdmin.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Admin; use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; diff --git a/tests/Resources/Admin/CoreExtensionsAdmin.php b/tests/Fixtures/App/Admin/CoreExtensionsAdmin.php similarity index 94% rename from tests/Resources/Admin/CoreExtensionsAdmin.php rename to tests/Fixtures/App/Admin/CoreExtensionsAdmin.php index 0b506aa..db31f34 100644 --- a/tests/Resources/Admin/CoreExtensionsAdmin.php +++ b/tests/Fixtures/App/Admin/CoreExtensionsAdmin.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Admin; class CoreExtensionsAdmin extends BaseAdmin { diff --git a/tests/Resources/Admin/MenuContentAdmin.php b/tests/Fixtures/App/Admin/MenuContentAdmin.php similarity index 97% rename from tests/Resources/Admin/MenuContentAdmin.php rename to tests/Fixtures/App/Admin/MenuContentAdmin.php index 08c0a6d..129e2ae 100644 --- a/tests/Resources/Admin/MenuContentAdmin.php +++ b/tests/Fixtures/App/Admin/MenuContentAdmin.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Admin; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Form\FormMapper; diff --git a/tests/Resources/Admin/SeoAwareContentAdmin.php b/tests/Fixtures/App/Admin/SeoAwareContentAdmin.php similarity index 94% rename from tests/Resources/Admin/SeoAwareContentAdmin.php rename to tests/Fixtures/App/Admin/SeoAwareContentAdmin.php index 51aa635..63aa545 100644 --- a/tests/Resources/Admin/SeoAwareContentAdmin.php +++ b/tests/Fixtures/App/Admin/SeoAwareContentAdmin.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Admin; class SeoAwareContentAdmin extends BaseAdmin { diff --git a/tests/Resources/DataFixtures/Phpcr/LoadBlockData.php b/tests/Fixtures/App/DataFixtures/Phpcr/LoadBlockData.php similarity index 99% rename from tests/Resources/DataFixtures/Phpcr/LoadBlockData.php rename to tests/Fixtures/App/DataFixtures/Phpcr/LoadBlockData.php index 00ba5ba..918687a 100644 --- a/tests/Resources/DataFixtures/Phpcr/LoadBlockData.php +++ b/tests/Fixtures/App/DataFixtures/Phpcr/LoadBlockData.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/tests/Resources/DataFixtures/Phpcr/LoadContentData.php b/tests/Fixtures/App/DataFixtures/Phpcr/LoadContentData.php similarity index 89% rename from tests/Resources/DataFixtures/Phpcr/LoadContentData.php rename to tests/Fixtures/App/DataFixtures/Phpcr/LoadContentData.php index 7c9a08e..0aa7e2e 100644 --- a/tests/Resources/DataFixtures/Phpcr/LoadContentData.php +++ b/tests/Fixtures/App/DataFixtures/Phpcr/LoadContentData.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; use PHPCR\Util\NodeHelper; use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route; use Symfony\Cmf\Bundle\SeoBundle\Doctrine\Phpcr\SeoMetadata; -use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\SeoAwareContent; +use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document\SeoAwareContent; class LoadContentData implements FixtureInterface { @@ -48,7 +48,7 @@ public function load(ObjectManager $manager) $route = new Route(); $route->setPosition($routeRoot, 'content-1'); $route->setContent($content); - $route->setDefault('_controller', 'Symfony\Cmf\Bundle\SeoBundle\Tests\Resources\Controller\TestController::indexAction'); + $route->setDefault('_controller', 'Symfony\Cmf\Bundle\SeoBundle\Tests\Fixtures\App\Controller\TestController::indexAction'); $manager->persist($route); diff --git a/tests/Resources/DataFixtures/Phpcr/LoadCoreData.php b/tests/Fixtures/App/DataFixtures/Phpcr/LoadCoreData.php similarity index 89% rename from tests/Resources/DataFixtures/Phpcr/LoadCoreData.php rename to tests/Fixtures/App/DataFixtures/Phpcr/LoadCoreData.php index 9914b96..0a9b563 100644 --- a/tests/Resources/DataFixtures/Phpcr/LoadCoreData.php +++ b/tests/Fixtures/App/DataFixtures/Phpcr/LoadCoreData.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; use Doctrine\ODM\PHPCR\Document\Generic; use PHPCR\Util\NodeHelper; -use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\CoreExtensionsAwareContent; +use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document\CoreExtensionsAwareContent; /** * @author Maximilian Berghoff diff --git a/tests/Resources/DataFixtures/Phpcr/LoadMenuData.php b/tests/Fixtures/App/DataFixtures/Phpcr/LoadMenuData.php similarity index 96% rename from tests/Resources/DataFixtures/Phpcr/LoadMenuData.php rename to tests/Fixtures/App/DataFixtures/Phpcr/LoadMenuData.php index 3255c1e..4b4a9dd 100644 --- a/tests/Resources/DataFixtures/Phpcr/LoadMenuData.php +++ b/tests/Fixtures/App/DataFixtures/Phpcr/LoadMenuData.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; @@ -18,7 +18,7 @@ use Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\Menu; use Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode; use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route; -use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\MenuContent; +use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document\MenuContent; class LoadMenuData implements FixtureInterface { diff --git a/tests/Resources/DataFixtures/Phpcr/LoadRouteData.php b/tests/Fixtures/App/DataFixtures/Phpcr/LoadRouteData.php similarity index 97% rename from tests/Resources/DataFixtures/Phpcr/LoadRouteData.php rename to tests/Fixtures/App/DataFixtures/Phpcr/LoadRouteData.php index 0decaf5..9b68ed1 100644 --- a/tests/Resources/DataFixtures/Phpcr/LoadRouteData.php +++ b/tests/Fixtures/App/DataFixtures/Phpcr/LoadRouteData.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/tests/Resources/DataFixtures/Phpcr/LoadStaticContentData.php b/tests/Fixtures/App/DataFixtures/Phpcr/LoadStaticContentData.php similarity index 97% rename from tests/Resources/DataFixtures/Phpcr/LoadStaticContentData.php rename to tests/Fixtures/App/DataFixtures/Phpcr/LoadStaticContentData.php index 91d6599..fdcc9a0 100644 --- a/tests/Resources/DataFixtures/Phpcr/LoadStaticContentData.php +++ b/tests/Fixtures/App/DataFixtures/Phpcr/LoadStaticContentData.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/tests/Resources/Document/ContentBase.php b/tests/Fixtures/App/Document/ContentBase.php similarity index 98% rename from tests/Resources/Document/ContentBase.php rename to tests/Fixtures/App/Document/ContentBase.php index 5e2ed8b..c0f2465 100644 --- a/tests/Resources/Document/ContentBase.php +++ b/tests/Fixtures/App/Document/ContentBase.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document; use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM; use Doctrine\ORM\Mapping as ORM; diff --git a/tests/Resources/Document/CoreExtensionsAwareContent.php b/tests/Fixtures/App/Document/CoreExtensionsAwareContent.php similarity index 98% rename from tests/Resources/Document/CoreExtensionsAwareContent.php rename to tests/Fixtures/App/Document/CoreExtensionsAwareContent.php index 3766a5e..27ea47e 100644 --- a/tests/Resources/Document/CoreExtensionsAwareContent.php +++ b/tests/Fixtures/App/Document/CoreExtensionsAwareContent.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document; use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM; use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableInterface; diff --git a/tests/Resources/Document/MenuContent.php b/tests/Fixtures/App/Document/MenuContent.php similarity index 99% rename from tests/Resources/Document/MenuContent.php rename to tests/Fixtures/App/Document/MenuContent.php index b7c467c..74ae311 100644 --- a/tests/Resources/Document/MenuContent.php +++ b/tests/Fixtures/App/Document/MenuContent.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCR; diff --git a/tests/Resources/Document/SeoAwareContent.php b/tests/Fixtures/App/Document/SeoAwareContent.php similarity index 97% rename from tests/Resources/Document/SeoAwareContent.php rename to tests/Fixtures/App/Document/SeoAwareContent.php index 4a9f094..7f028dc 100644 --- a/tests/Resources/Document/SeoAwareContent.php +++ b/tests/Fixtures/App/Document/SeoAwareContent.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document; +namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document; use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM; use Symfony\Cmf\Bundle\SeoBundle\Model\SeoMetadataInterface; diff --git a/tests/Fixtures/App/Kernel.php b/tests/Fixtures/App/Kernel.php new file mode 100644 index 0000000..59d5407 --- /dev/null +++ b/tests/Fixtures/App/Kernel.php @@ -0,0 +1,39 @@ +requireBundleSet('default'); + + $this->requireBundleSets(['phpcr_odm']); + + $this->registerConfiguredBundles(); + if (class_exists('Symfony\Cmf\Bundle\ResourceRestBundle\CmfResourceRestBundle')) { + $this->addBundles([ + new \Symfony\Cmf\Bundle\ResourceBundle\CmfResourceBundle(), + new \Symfony\Cmf\Bundle\ResourceRestBundle\CmfResourceRestBundle(), + ]); + } + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load(__DIR__.'/config/config.php'); + $loader->load(__DIR__.'/config/admin-test.xml'); + } +} diff --git a/tests/Resources/app/Resources/translations/mesages.de.xliff b/tests/Fixtures/App/Resources/translations/mesages.de.xliff similarity index 100% rename from tests/Resources/app/Resources/translations/mesages.de.xliff rename to tests/Fixtures/App/Resources/translations/mesages.de.xliff diff --git a/tests/Resources/app/Resources/translations/mesages.en.xliff b/tests/Fixtures/App/Resources/translations/mesages.en.xliff similarity index 100% rename from tests/Resources/app/Resources/translations/mesages.en.xliff rename to tests/Fixtures/App/Resources/translations/mesages.en.xliff diff --git a/tests/Resources/app/config/admin-test.xml b/tests/Fixtures/App/config/admin-test.xml similarity index 100% rename from tests/Resources/app/config/admin-test.xml rename to tests/Fixtures/App/config/admin-test.xml diff --git a/tests/Fixtures/App/config/bundles.php b/tests/Fixtures/App/config/bundles.php new file mode 100644 index 0000000..6657452 --- /dev/null +++ b/tests/Fixtures/App/config/bundles.php @@ -0,0 +1,38 @@ + ['all' => true], + Burgov\Bundle\KeyValueFormBundle\BurgovKeyValueFormBundle::class => ['all' => true], + Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\CmfSonataPhpcrAdminIntegrationBundle::class => ['all' => true], + Symfony\Cmf\Bundle\SeoBundle\CmfSeoBundle::class => ['all' => true], + Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle::class => ['all' => true], + Symfony\Cmf\Bundle\CoreBundle\CmfCoreBundle::class => ['all' => true], + Symfony\Cmf\Bundle\BlockBundle\CmfBlockBundle::class => ['all' => true], + Symfony\Cmf\Bundle\MenuBundle\CmfMenuBundle::class => ['all' => true], + Symfony\Cmf\Bundle\ContentBundle\CmfContentBundle::class => ['all' => true], + JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true], + Ivory\CKEditorBundle\IvoryCKEditorBundle::class => ['all' => true], + SonataBlockBundle::class => ['all' => true], + SonataCoreBundle::class => ['all' => true], + SonataAdminBundle::class => ['all' => true], + KnpMenuBundle::class => ['all' => true], + SonataDoctrinePHPCRAdminBundle::class => ['all' => true], + CmfTreeBrowserBundle::class => ['all' => true], +]; diff --git a/tests/Resources/app/config/cmf_sonata_admin_integration.yml b/tests/Fixtures/App/config/cmf_sonata_admin_integration.yml similarity index 92% rename from tests/Resources/app/config/cmf_sonata_admin_integration.yml rename to tests/Fixtures/App/config/cmf_sonata_admin_integration.yml index 82053b9..e6eaf8b 100644 --- a/tests/Resources/app/config/cmf_sonata_admin_integration.yml +++ b/tests/Fixtures/App/config/cmf_sonata_admin_integration.yml @@ -55,24 +55,26 @@ cmf_menu: services: sonata.admin.seo_content: - class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin\SeoAwareContentAdmin + public: true + class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Admin\SeoAwareContentAdmin tags: - { name: sonata.admin, manager_type: doctrine_phpcr, label_catalogue: CmfSeoBundle, group: dashboard.cmf, label: dashboard.label_seo_content, label_translator_strategy: sonata.admin.label.strategy.underscore} arguments: - ~ - - Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\SeoAwareContent + - Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document\SeoAwareContent - SonataAdminBundle:CRUD calls: - [ setTranslationDomain, [CmfSonataPhpcrAdminIntegrationBundle]] - [ setRouteBuilder, ['@sonata.admin.route.path_info_slashes']] - [ setRootPath, [/test/content]] sonata.admin.core_examples: - class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin\CoreExtensionsAdmin + public: true + class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Admin\CoreExtensionsAdmin tags: - { name: sonata.admin, manager_type: doctrine_phpcr, label_catalogue: CmfSeoBundle, group: dashboard.cmf, label: dashboard.label_seo_content, label_translator_strategy: sonata.admin.label.strategy.underscore} arguments: - ~ - - Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\CoreExtensionsAwareContent + - Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document\CoreExtensionsAwareContent - SonataAdminBundle:CRUD calls: - [ setTranslationDomain, [CmfSonataPhpcrAdminIntegrationBundle]] @@ -80,12 +82,13 @@ services: - [ setRootPath, [/test/core]] sonata.admin.menu: - class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin\MenuContentAdmin + public: true + class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Admin\MenuContentAdmin tags: - { name: sonata.admin, manager_type: doctrine_phpcr, group: Test, label: Test Content } arguments: - ~ - - Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\MenuContent + - Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Document\MenuContent - SonataAdminBundle:CRUD sonata_admin: diff --git a/tests/Resources/app/config/config.php b/tests/Fixtures/App/config/config.php similarity index 100% rename from tests/Resources/app/config/config.php rename to tests/Fixtures/App/config/config.php diff --git a/tests/Resources/app/config/routing.php b/tests/Fixtures/App/config/routing.php similarity index 100% rename from tests/Resources/app/config/routing.php rename to tests/Fixtures/App/config/routing.php diff --git a/tests/Resources/app/config/routing.yml b/tests/Fixtures/App/config/routing.yml similarity index 100% rename from tests/Resources/app/config/routing.yml rename to tests/Fixtures/App/config/routing.yml diff --git a/tests/Resources/app/config/sonata_admin.yml b/tests/Fixtures/App/config/sonata_admin.yml similarity index 100% rename from tests/Resources/app/config/sonata_admin.yml rename to tests/Fixtures/App/config/sonata_admin.yml diff --git a/tests/Resources/app/config/tree_browser_2.x.yml b/tests/Fixtures/App/config/tree_browser_2.x.yml similarity index 100% rename from tests/Resources/app/config/tree_browser_2.x.yml rename to tests/Fixtures/App/config/tree_browser_2.x.yml diff --git a/tests/Resources/app/translations/mesages.de.xliff b/tests/Fixtures/App/translations/mesages.de.xliff similarity index 100% rename from tests/Resources/app/translations/mesages.de.xliff rename to tests/Fixtures/App/translations/mesages.de.xliff diff --git a/tests/Resources/app/translations/mesages.en.xliff b/tests/Fixtures/App/translations/mesages.en.xliff similarity index 100% rename from tests/Resources/app/translations/mesages.en.xliff rename to tests/Fixtures/App/translations/mesages.en.xliff diff --git a/tests/Fixtures/App/var/gitempty b/tests/Fixtures/App/var/gitempty new file mode 100644 index 0000000..e69de29 diff --git a/tests/Resources/Fixtures/config/config.php b/tests/Fixtures/fixtures/config/config.php similarity index 100% rename from tests/Resources/Fixtures/config/config.php rename to tests/Fixtures/fixtures/config/config.php diff --git a/tests/Resources/Fixtures/config/config.xml b/tests/Fixtures/fixtures/config/config.xml similarity index 100% rename from tests/Resources/Fixtures/config/config.xml rename to tests/Fixtures/fixtures/config/config.xml diff --git a/tests/Resources/Fixtures/config/config.yml b/tests/Fixtures/fixtures/config/config.yml similarity index 100% rename from tests/Resources/Fixtures/config/config.yml rename to tests/Fixtures/fixtures/config/config.yml diff --git a/tests/Resources/app/AppKernel.php b/tests/Resources/app/AppKernel.php deleted file mode 100644 index d103c39..0000000 --- a/tests/Resources/app/AppKernel.php +++ /dev/null @@ -1,54 +0,0 @@ -requireBundleSet('default'); - - $this->requireBundleSets([ - 'phpcr_odm', - 'sonata_admin_phpcr', - ]); - - $this->addBundles([ - new Sonata\SeoBundle\SonataSeoBundle(), - new Burgov\Bundle\KeyValueFormBundle\BurgovKeyValueFormBundle(), - - new Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\CmfSonataPhpcrAdminIntegrationBundle(), - new Symfony\Cmf\Bundle\SeoBundle\CmfSeoBundle(), - new Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(), - new Symfony\Cmf\Bundle\CoreBundle\CmfCoreBundle(), - new Symfony\Cmf\Bundle\BlockBundle\CmfBlockBundle(), - new Symfony\Cmf\Bundle\MenuBundle\CmfMenuBundle(), - new Symfony\Cmf\Bundle\ContentBundle\CmfContentBundle(), - new JMS\SerializerBundle\JMSSerializerBundle(), - new Ivory\CKEditorBundle\IvoryCKEditorBundle(), - ]); - - if (class_exists('Symfony\Cmf\Bundle\ResourceRestBundle\CmfResourceRestBundle')) { - $this->addBundles([ - new Symfony\Cmf\Bundle\ResourceBundle\CmfResourceBundle(), - new Symfony\Cmf\Bundle\ResourceRestBundle\CmfResourceRestBundle(), - ]); - } - } - - public function registerContainerConfiguration(LoaderInterface $loader) - { - $loader->load(__DIR__.'/config/config.php'); - $loader->load(__DIR__.'/config/admin-test.xml'); - } -} diff --git a/tests/Unit/DependencyInjection/ConfigurationTest.php b/tests/Unit/DependencyInjection/ConfigurationTest.php index b9d9190..0857d4e 100644 --- a/tests/Unit/DependencyInjection/ConfigurationTest.php +++ b/tests/Unit/DependencyInjection/ConfigurationTest.php @@ -68,7 +68,7 @@ public function testDefaultsForAllConfigFormats() ]; $sources = array_map(function ($path) { - return __DIR__.'/../../Resources/Fixtures/'.$path; + return __DIR__.'/../../Fixtures/fixtures/'.$path; }, [ 'config/config.yml', 'config/config.php', diff --git a/tests/Unit/DependencyInjection/XmlSchemaTest.php b/tests/Unit/DependencyInjection/XmlSchemaTest.php index 4869a6e..cbd9342 100644 --- a/tests/Unit/DependencyInjection/XmlSchemaTest.php +++ b/tests/Unit/DependencyInjection/XmlSchemaTest.php @@ -18,7 +18,7 @@ class XmlSchemaTest extends XmlSchemaTestCase public function testSchema() { $xmlFiles = array_map(function ($file) { - return __DIR__.'/../../Resources/Fixtures/config/'.$file; + return __DIR__.'/../../Fixtures/fixtures/config/'.$file; }, ['config.xml']); foreach ($xmlFiles as $xmlFile) { diff --git a/tests/Unit/Description/SonataEnhancerTest.php b/tests/Unit/Description/SonataEnhancerTest.php index 4846e5e..b6fd0f2 100644 --- a/tests/Unit/Description/SonataEnhancerTest.php +++ b/tests/Unit/Description/SonataEnhancerTest.php @@ -56,7 +56,6 @@ public function setUp() $this->routeBuilder = new PathInfoBuilder($this->prophesize(AuditManagerInterface::class)->reveal()); $this->admin->setRouteBuilder($this->routeBuilder); $this->admin->setModelManager($this->modelManager->reveal()); - $this->admin->setBaseCodeRoute('test'); } /** diff --git a/tests/WebTest/Admin/Block/AbstractBlockAdminTestCase.php b/tests/WebTest/Admin/Block/AbstractBlockAdminTestCase.php index f91e50d..8030d5c 100644 --- a/tests/WebTest/Admin/Block/AbstractBlockAdminTestCase.php +++ b/tests/WebTest/Admin/Block/AbstractBlockAdminTestCase.php @@ -55,7 +55,7 @@ abstract public function testBlockShow(); public function setUp() { $this->db('PHPCR')->loadFixtures([ - 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadBlockData', + 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadBlockData', ]); $this->client = $this->createClient(); } diff --git a/tests/WebTest/Admin/Block/PHPCRBlockLoaderTest.php b/tests/WebTest/Admin/Block/PHPCRBlockLoaderTest.php index 5c720cb..d3112d8 100644 --- a/tests/WebTest/Admin/Block/PHPCRBlockLoaderTest.php +++ b/tests/WebTest/Admin/Block/PHPCRBlockLoaderTest.php @@ -19,7 +19,7 @@ class PHPCRBlockLoaderTest extends BaseTestCase public function setUp() { $this->db('PHPCR')->loadFixtures([ - 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadBlockData', + 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadBlockData', ]); $this->client = $this->createClient(); } diff --git a/tests/WebTest/Admin/Content/StaticContentAdminTest.php b/tests/WebTest/Admin/Content/StaticContentAdminTest.php index 30ac7a9..4a8ee38 100644 --- a/tests/WebTest/Admin/Content/StaticContentAdminTest.php +++ b/tests/WebTest/Admin/Content/StaticContentAdminTest.php @@ -11,7 +11,7 @@ namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\WebTest\Admin; -use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadStaticContentData; +use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadStaticContentData; use Symfony\Cmf\Component\Testing\Functional\BaseTestCase; class StaticContentAdminTest extends BaseTestCase diff --git a/tests/WebTest/Admin/Core/Extension/CoreAdminExtensionTest.php b/tests/WebTest/Admin/Core/Extension/CoreAdminExtensionTest.php index 48b72e7..8761e43 100644 --- a/tests/WebTest/Admin/Core/Extension/CoreAdminExtensionTest.php +++ b/tests/WebTest/Admin/Core/Extension/CoreAdminExtensionTest.php @@ -23,7 +23,7 @@ class CoreAdminExtensionTest extends TestCase public function setUp() { $this->db('PHPCR')->loadFixtures([ - 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadCoreData', + 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadCoreData', ]); $this->client = $this->createClient(); } diff --git a/tests/WebTest/Admin/Menu/Extension/MenuNodeReferrersExtensionTest.php b/tests/WebTest/Admin/Menu/Extension/MenuNodeReferrersExtensionTest.php index 63f4d65..7d37888 100644 --- a/tests/WebTest/Admin/Menu/Extension/MenuNodeReferrersExtensionTest.php +++ b/tests/WebTest/Admin/Menu/Extension/MenuNodeReferrersExtensionTest.php @@ -11,7 +11,7 @@ namespace Symfony\Cmf\Bundle\MenuBundle\Tests\WebTest\Admin\Extension; -use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadMenuData; +use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadMenuData; use Symfony\Cmf\Component\Testing\Functional\BaseTestCase; class MenuNodeReferrersExtensionTest extends BaseTestCase diff --git a/tests/WebTest/Admin/Menu/MenuAdminTest.php b/tests/WebTest/Admin/Menu/MenuAdminTest.php index 0290fff..21449a8 100644 --- a/tests/WebTest/Admin/Menu/MenuAdminTest.php +++ b/tests/WebTest/Admin/Menu/MenuAdminTest.php @@ -11,7 +11,7 @@ namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\WebTest\Admin\Menu; -use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadMenuData; +use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadMenuData; use Symfony\Cmf\Component\Testing\Functional\BaseTestCase; class MenuAdminTest extends BaseTestCase diff --git a/tests/WebTest/Admin/Menu/MenuNodeAdminTest.php b/tests/WebTest/Admin/Menu/MenuNodeAdminTest.php index bb9326f..e416c28 100644 --- a/tests/WebTest/Admin/Menu/MenuNodeAdminTest.php +++ b/tests/WebTest/Admin/Menu/MenuNodeAdminTest.php @@ -11,7 +11,7 @@ namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\WebTest\Admin\Menu; -use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadMenuData; +use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadMenuData; use Symfony\Cmf\Component\Testing\Functional\BaseTestCase; class MenuNodeAdminTest extends BaseTestCase diff --git a/tests/WebTest/Admin/Routing/RedirectRouteAdminTest.php b/tests/WebTest/Admin/Routing/RedirectRouteAdminTest.php index c2c12e0..0075e98 100644 --- a/tests/WebTest/Admin/Routing/RedirectRouteAdminTest.php +++ b/tests/WebTest/Admin/Routing/RedirectRouteAdminTest.php @@ -19,7 +19,7 @@ class RedirectRouteAdminTest extends BaseTestCase public function setUp() { $this->db('PHPCR')->loadFixtures([ - 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadRouteData', + 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadRouteData', ]); $this->client = $this->createClient(); } diff --git a/tests/WebTest/Admin/Routing/RouteAdminTest.php b/tests/WebTest/Admin/Routing/RouteAdminTest.php index 71ae420..d3b2990 100644 --- a/tests/WebTest/Admin/Routing/RouteAdminTest.php +++ b/tests/WebTest/Admin/Routing/RouteAdminTest.php @@ -19,7 +19,7 @@ class RouteAdminTest extends BaseTestCase public function setUp() { $this->db('PHPCR')->loadFixtures([ - 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadRouteData', + 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadRouteData', ]); $this->client = $this->createClient(); } diff --git a/tests/WebTest/Admin/TestCase.php b/tests/WebTest/Admin/TestCase.php index afddabe..309d989 100644 --- a/tests/WebTest/Admin/TestCase.php +++ b/tests/WebTest/Admin/TestCase.php @@ -11,7 +11,7 @@ namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\WebTest\Admin; -use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\DataFixtures\Phpcr\LoadContentData; +use Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\DataFixtures\Phpcr\LoadContentData; use Symfony\Cmf\Component\Testing\Functional\BaseTestCase; /**