From 4db28b7bbd19a54b4d179c7d882acaa012d4612c Mon Sep 17 00:00:00 2001 From: Toni Uebernickel Date: Sat, 23 Jan 2016 21:41:17 +0100 Subject: [PATCH] introduce Propel\Bundle\PropelBundle namespace --- Command/AbstractCommand.php | 5 +- Command/BuildCommand.php | 8 +- Command/DatabaseCreateCommand.php | 6 +- Command/DatabaseDropCommand.php | 6 +- Command/FixturesDumpCommand.php | 8 +- Command/FixturesLoadCommand.php | 11 +- Command/FormGenerateCommand.php | 3 +- Command/GeneratorAwareCommand.php | 3 +- Command/GraphvizGenerateCommand.php | 4 +- Command/MigrationGenerateDiffCommand.php | 4 +- Command/MigrationMigrateCommand.php | 4 +- Command/MigrationStatusCommand.php | 4 +- Command/ModelBuildCommand.php | 6 +- Command/Phing.php | 3 +- Command/ReverseCommand.php | 6 +- Command/SqlBuildCommand.php | 2 +- Command/SqlInsertCommand.php | 2 +- Command/TableDropCommand.php | 10 +- Controller/PanelController.php | 3 +- DataCollector/PropelDataCollector.php | 4 +- DataFixtures/AbstractDataHandler.php | 5 +- DataFixtures/Dumper/AbstractDataDumper.php | 11 +- DataFixtures/Dumper/DataDumperInterface.php | 3 +- DataFixtures/Dumper/YamlDataDumper.php | 3 +- DataFixtures/Loader/AbstractDataLoader.php | 17 ++- DataFixtures/Loader/DataLoaderInterface.php | 3 +- DataFixtures/Loader/DataWiper.php | 3 +- DataFixtures/Loader/XmlDataLoader.php | 3 +- DataFixtures/Loader/YamlDataLoader.php | 3 +- DependencyInjection/Configuration.php | 3 +- DependencyInjection/PropelExtension.php | 12 +- DependencyInjection/Properties.php | 3 +- .../Security/UserProvider/PropelFactory.php | 2 +- Form/BaseAbstractType.php | 2 +- Form/ChoiceList/ModelChoiceList.php | 4 +- .../CollectionToArrayTransformer.php | 2 +- .../TranslationCollectionFormListener.php | 2 +- .../EventListener/TranslationFormListener.php | 2 +- Form/PropelExtension.php | 2 +- Form/PropelTypeGuesser.php | 2 +- Form/Type/ModelType.php | 6 +- Form/Type/TranslationCollectionType.php | 4 +- Form/Type/TranslationType.php | 4 +- Logger/PropelLogger.php | 2 +- PropelBundle.php | 4 +- .../ParamConverter/PropelParamConverter.php | 6 +- Resources/config/converters.xml | 2 +- Resources/config/propel.xml | 16 +-- Resources/doc/index.markdown | 2 +- Resources/doc/model_translation.markdown | 6 +- .../doc/unique_object_validator.markdown | 10 +- Resources/skeleton/FormType.php | 2 +- Security/User/PropelUserProvider.php | 2 +- Tests/Command/AbstractCommandTest.php | 7 +- Tests/Command/DatabaseCreateCommandTest.php | 7 +- Tests/Command/FixturesLoadCommandTest.php | 8 +- Tests/Command/GeneratorAwareCommandTest.php | 7 +- .../DataCollector/PropelDataCollectorTest.php | 8 +- .../Dumper/YamlDataDumperTest.php | 15 +- Tests/DataFixtures/Loader/DataWiperTest.php | 19 ++- .../DataFixtures/Loader/XmlDataLoaderTest.php | 15 +- .../Loader/YamlDataLoaderTest.php | 131 +++++++++--------- Tests/DataFixtures/TestCase.php | 9 +- .../PropelExtensionTest.php | 8 +- Tests/Fixtures/Column.php | 2 +- Tests/Fixtures/Item.php | 2 +- Tests/Fixtures/ItemQuery.php | 2 +- Tests/Fixtures/Model/Book.php | 4 +- Tests/Fixtures/Model/BookPeer.php | 4 +- Tests/Fixtures/Model/BookQuery.php | 4 +- Tests/Fixtures/Model/User.php | 4 +- Tests/Fixtures/Model/map/BookTableMap.php | 4 +- Tests/Fixtures/Model/om/BaseBook.php | 24 ++-- Tests/Fixtures/Model/om/BaseBookPeer.php | 10 +- Tests/Fixtures/Model/om/BaseBookQuery.php | 8 +- Tests/Fixtures/ReadOnlyItem.php | 2 +- Tests/Fixtures/ReadOnlyItemQuery.php | 2 +- Tests/Fixtures/TranslatableItem.php | 2 +- Tests/Fixtures/TranslatableItemI18n.php | 2 +- Tests/Fixtures/translation_schema.xml | 2 +- .../ChoiceList/CompatModelChoiceListTest.php | 14 +- Tests/Form/ChoiceList/ModelChoiceListTest.php | 16 +-- .../CollectionToArrayTransformerTest.php | 6 +- Tests/Form/PropelTypeGuesserTest.php | 10 +- .../Type/TranslationCollectionTypeTest.php | 16 +-- .../PropelParamConverterTest.php | 102 +++++++------- .../Security/User/PropelUserProviderTest.php | 12 +- Tests/TestCase.php | 3 +- Tests/Translation/ModelTranslationTest.php | 16 +-- Tests/Util/PropelInflectorTest.php | 7 +- Translation/ModelTranslation.php | 2 +- Twig/Extension/SyntaxExtension.php | 3 +- Util/PropelInflector.php | 3 +- Validator/Constraints/UniqueObject.php | 3 +- .../Constraints/UniqueObjectValidator.php | 3 +- composer.json | 2 +- 96 files changed, 359 insertions(+), 426 deletions(-) diff --git a/Command/AbstractCommand.php b/Command/AbstractCommand.php index 9bba4dc..2b48272 100644 --- a/Command/AbstractCommand.php +++ b/Command/AbstractCommand.php @@ -7,17 +7,16 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\Command; +namespace Propel\Bundle\PropelBundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Component\HttpKernel\KernelInterface; /** * Wrapper for Propel commands. diff --git a/Command/BuildCommand.php b/Command/BuildCommand.php index 680d27e..c1ec783 100644 --- a/Command/BuildCommand.php +++ b/Command/BuildCommand.php @@ -7,16 +7,12 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; +namespace Propel\Bundle\PropelBundle\Command; use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\Output; /** * BuildCommand. diff --git a/Command/DatabaseCreateCommand.php b/Command/DatabaseCreateCommand.php index cc13efc..dc97d47 100644 --- a/Command/DatabaseCreateCommand.php +++ b/Command/DatabaseCreateCommand.php @@ -7,13 +7,11 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; /** * DatabaseCreateCommand class. diff --git a/Command/DatabaseDropCommand.php b/Command/DatabaseDropCommand.php index 287dc59..2c4605d 100644 --- a/Command/DatabaseDropCommand.php +++ b/Command/DatabaseDropCommand.php @@ -7,13 +7,11 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; /** * DatabaseDropCommand class. diff --git a/Command/FixturesDumpCommand.php b/Command/FixturesDumpCommand.php index dbe73c6..bc41ab1 100644 --- a/Command/FixturesDumpCommand.php +++ b/Command/FixturesDumpCommand.php @@ -7,13 +7,11 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; -use Propel\PropelBundle\DataFixtures\Dumper\YamlDataDumper; -use Symfony\Component\Console\Input\InputOption; +use Propel\Bundle\PropelBundle\DataFixtures\Dumper\YamlDataDumper; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Filesystem\Filesystem; diff --git a/Command/FixturesLoadCommand.php b/Command/FixturesLoadCommand.php index 4f8fba5..42f0656 100644 --- a/Command/FixturesLoadCommand.php +++ b/Command/FixturesLoadCommand.php @@ -7,21 +7,18 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Symfony\Component\Console\Input\InputOption; +use Propel\Bundle\PropelBundle\DataFixtures\Loader\XmlDataLoader; +use Propel\Bundle\PropelBundle\DataFixtures\Loader\YamlDataLoader; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; use Symfony\Component\HttpKernel\Bundle\BundleInterface; -use Propel\PropelBundle\Command\AbstractCommand; -use Propel\PropelBundle\DataFixtures\Loader\YamlDataLoader; -use Propel\PropelBundle\DataFixtures\Loader\XmlDataLoader; - /** * FixturesLoadCommand * diff --git a/Command/FormGenerateCommand.php b/Command/FormGenerateCommand.php index 2a5e243..19abe66 100644 --- a/Command/FormGenerateCommand.php +++ b/Command/FormGenerateCommand.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\Command; +namespace Propel\Bundle\PropelBundle\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; diff --git a/Command/GeneratorAwareCommand.php b/Command/GeneratorAwareCommand.php index 8a433f2..9e4c1d9 100644 --- a/Command/GeneratorAwareCommand.php +++ b/Command/GeneratorAwareCommand.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\Command; +namespace Propel\Bundle\PropelBundle\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; diff --git a/Command/GraphvizGenerateCommand.php b/Command/GraphvizGenerateCommand.php index be1cac6..77e9790 100644 --- a/Command/GraphvizGenerateCommand.php +++ b/Command/GraphvizGenerateCommand.php @@ -7,10 +7,8 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; diff --git a/Command/MigrationGenerateDiffCommand.php b/Command/MigrationGenerateDiffCommand.php index cfeaa13..9164ed1 100644 --- a/Command/MigrationGenerateDiffCommand.php +++ b/Command/MigrationGenerateDiffCommand.php @@ -7,10 +7,8 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; diff --git a/Command/MigrationMigrateCommand.php b/Command/MigrationMigrateCommand.php index 9122d48..757b036 100644 --- a/Command/MigrationMigrateCommand.php +++ b/Command/MigrationMigrateCommand.php @@ -7,10 +7,8 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; diff --git a/Command/MigrationStatusCommand.php b/Command/MigrationStatusCommand.php index 778be38..f088ead 100644 --- a/Command/MigrationStatusCommand.php +++ b/Command/MigrationStatusCommand.php @@ -7,10 +7,8 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; diff --git a/Command/ModelBuildCommand.php b/Command/ModelBuildCommand.php index c7bee3b..e6d9c5d 100644 --- a/Command/ModelBuildCommand.php +++ b/Command/ModelBuildCommand.php @@ -7,12 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; -use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; diff --git a/Command/Phing.php b/Command/Phing.php index ce6afd5..caf9986 100644 --- a/Command/Phing.php +++ b/Command/Phing.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\Command; +namespace Propel\Bundle\PropelBundle\Command; /** * @author Fabien Potencier diff --git a/Command/ReverseCommand.php b/Command/ReverseCommand.php index f20bc1a..942b710 100644 --- a/Command/ReverseCommand.php +++ b/Command/ReverseCommand.php @@ -7,12 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Filesystem\Filesystem; diff --git a/Command/SqlBuildCommand.php b/Command/SqlBuildCommand.php index 939a3a1..f5f570b 100644 --- a/Command/SqlBuildCommand.php +++ b/Command/SqlBuildCommand.php @@ -7,7 +7,7 @@ * * @license MIT License */ -namespace Propel\PropelBundle\Command; +namespace Propel\Bundle\PropelBundle\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/Command/SqlInsertCommand.php b/Command/SqlInsertCommand.php index 2bdb39f..d2d930e 100644 --- a/Command/SqlInsertCommand.php +++ b/Command/SqlInsertCommand.php @@ -7,7 +7,7 @@ * * @license MIT License */ -namespace Propel\PropelBundle\Command; +namespace Propel\Bundle\PropelBundle\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/Command/TableDropCommand.php b/Command/TableDropCommand.php index 5758d2e..7058f60 100644 --- a/Command/TableDropCommand.php +++ b/Command/TableDropCommand.php @@ -7,14 +7,12 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Command; -namespace Propel\PropelBundle\Command; - -use Propel\PropelBundle\Command\AbstractCommand; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; /** * TableDropCommand class. diff --git a/Controller/PanelController.php b/Controller/PanelController.php index 47a4ca8..25fb16b 100644 --- a/Controller/PanelController.php +++ b/Controller/PanelController.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\Controller; +namespace Propel\Bundle\PropelBundle\Controller; use Symfony\Component\DependencyInjection\ContainerAware; use Symfony\Component\HttpFoundation\Response; diff --git a/DataCollector/PropelDataCollector.php b/DataCollector/PropelDataCollector.php index 69d027a..e0c8a32 100644 --- a/DataCollector/PropelDataCollector.php +++ b/DataCollector/PropelDataCollector.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\DataCollector; +namespace Propel\Bundle\PropelBundle\DataCollector; -use Propel\PropelBundle\Logger\PropelLogger; +use Propel\Bundle\PropelBundle\Logger\PropelLogger; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DataCollector\DataCollector; diff --git a/DataFixtures/AbstractDataHandler.php b/DataFixtures/AbstractDataHandler.php index da49cc1..5937b0c 100644 --- a/DataFixtures/AbstractDataHandler.php +++ b/DataFixtures/AbstractDataHandler.php @@ -7,10 +7,9 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\DataFixtures; -namespace Propel\PropelBundle\DataFixtures; - -use \Propel; +use Propel; use Symfony\Component\Finder\Finder; /** diff --git a/DataFixtures/Dumper/AbstractDataDumper.php b/DataFixtures/Dumper/AbstractDataDumper.php index f5ad731..d55bda1 100644 --- a/DataFixtures/Dumper/AbstractDataDumper.php +++ b/DataFixtures/Dumper/AbstractDataDumper.php @@ -7,13 +7,12 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\DataFixtures\Dumper; -namespace Propel\PropelBundle\DataFixtures\Dumper; - -use Propel\PropelBundle\DataFixtures\AbstractDataHandler; -use \PDO; -use \Propel; -use \PropelColumnTypes; +use PDO; +use Propel; +use Propel\Bundle\PropelBundle\DataFixtures\AbstractDataHandler; +use PropelColumnTypes; /** * Abstract class to manage a common logic to dump data. diff --git a/DataFixtures/Dumper/DataDumperInterface.php b/DataFixtures/Dumper/DataDumperInterface.php index aec062c..4d39bfd 100644 --- a/DataFixtures/Dumper/DataDumperInterface.php +++ b/DataFixtures/Dumper/DataDumperInterface.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\DataFixtures\Dumper; +namespace Propel\Bundle\PropelBundle\DataFixtures\Dumper; /** * Interface that exposes how Propel data dumpers should work. diff --git a/DataFixtures/Dumper/YamlDataDumper.php b/DataFixtures/Dumper/YamlDataDumper.php index c927d92..dca5686 100644 --- a/DataFixtures/Dumper/YamlDataDumper.php +++ b/DataFixtures/Dumper/YamlDataDumper.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\DataFixtures\Dumper; +namespace Propel\Bundle\PropelBundle\DataFixtures\Dumper; use Symfony\Component\Yaml\Yaml; diff --git a/DataFixtures/Loader/AbstractDataLoader.php b/DataFixtures/Loader/AbstractDataLoader.php index 0dd2f6d..3e249b5 100644 --- a/DataFixtures/Loader/AbstractDataLoader.php +++ b/DataFixtures/Loader/AbstractDataLoader.php @@ -7,16 +7,15 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\DataFixtures\Loader; -namespace Propel\PropelBundle\DataFixtures\Loader; - -use \BasePeer; -use \BaseObject; -use \Propel; -use \PropelColumnTypes; -use \PropelException; -use Propel\PropelBundle\DataFixtures\AbstractDataHandler; -use Propel\PropelBundle\Util\PropelInflector; +use BaseObject; +use BasePeer; +use Propel; +use Propel\Bundle\PropelBundle\DataFixtures\AbstractDataHandler; +use Propel\Bundle\PropelBundle\Util\PropelInflector; +use PropelColumnTypes; +use PropelException; /** * Abstract class to manage a common logic to load datas. diff --git a/DataFixtures/Loader/DataLoaderInterface.php b/DataFixtures/Loader/DataLoaderInterface.php index df8e8b6..3c99496 100644 --- a/DataFixtures/Loader/DataLoaderInterface.php +++ b/DataFixtures/Loader/DataLoaderInterface.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\DataFixtures\Loader; +namespace Propel\Bundle\PropelBundle\DataFixtures\Loader; /** * Interface that exposes how Propel data loaders should work. diff --git a/DataFixtures/Loader/DataWiper.php b/DataFixtures/Loader/DataWiper.php index daa3923..ff5435c 100644 --- a/DataFixtures/Loader/DataWiper.php +++ b/DataFixtures/Loader/DataWiper.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\DataFixtures\Loader; +namespace Propel\Bundle\PropelBundle\DataFixtures\Loader; /** * @author Toni Uebernickel diff --git a/DataFixtures/Loader/XmlDataLoader.php b/DataFixtures/Loader/XmlDataLoader.php index efc3738..9b05534 100644 --- a/DataFixtures/Loader/XmlDataLoader.php +++ b/DataFixtures/Loader/XmlDataLoader.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\DataFixtures\Loader; +namespace Propel\Bundle\PropelBundle\DataFixtures\Loader; /** * XML fixtures loader. diff --git a/DataFixtures/Loader/YamlDataLoader.php b/DataFixtures/Loader/YamlDataLoader.php index 69cb3e3..3d3e210 100644 --- a/DataFixtures/Loader/YamlDataLoader.php +++ b/DataFixtures/Loader/YamlDataLoader.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\DataFixtures\Loader; +namespace Propel\Bundle\PropelBundle\DataFixtures\Loader; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Yaml\ParseException; diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 7bbc45c..69faaeb 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\DependencyInjection; +namespace Propel\Bundle\PropelBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; diff --git a/DependencyInjection/PropelExtension.php b/DependencyInjection/PropelExtension.php index 60dc3ef..22b31e6 100644 --- a/DependencyInjection/PropelExtension.php +++ b/DependencyInjection/PropelExtension.php @@ -7,15 +7,13 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\DependencyInjection; -namespace Propel\PropelBundle\DependencyInjection; - -use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\Config\FileLocator; use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; /** * PropelExtension loads the PropelBundle configuration. diff --git a/DependencyInjection/Properties.php b/DependencyInjection/Properties.php index bc6ede1..86a58d8 100644 --- a/DependencyInjection/Properties.php +++ b/DependencyInjection/Properties.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\DependencyInjection; +namespace Propel\Bundle\PropelBundle\DependencyInjection; /** * Properties. diff --git a/DependencyInjection/Security/UserProvider/PropelFactory.php b/DependencyInjection/Security/UserProvider/PropelFactory.php index 9797b46..8008bc7 100644 --- a/DependencyInjection/Security/UserProvider/PropelFactory.php +++ b/DependencyInjection/Security/UserProvider/PropelFactory.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\DependencyInjection\Security\UserProvider; +namespace Propel\Bundle\PropelBundle\DependencyInjection\Security\UserProvider; use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\UserProviderFactoryInterface; use Symfony\Component\Config\Definition\Builder\NodeDefinition; diff --git a/Form/BaseAbstractType.php b/Form/BaseAbstractType.php index bae9d20..11ef29d 100644 --- a/Form/BaseAbstractType.php +++ b/Form/BaseAbstractType.php @@ -1,6 +1,6 @@ - Propel\PropelBundle\Request\ParamConverter\PropelParamConverter + Propel\Bundle\PropelBundle\Request\ParamConverter\PropelParamConverter diff --git a/Resources/config/propel.xml b/Resources/config/propel.xml index 4ae8e93..ec39ed1 100644 --- a/Resources/config/propel.xml +++ b/Resources/config/propel.xml @@ -7,14 +7,14 @@ default PropelConfiguration - Propel\PropelBundle\Logger\PropelLogger - Propel\PropelBundle\DataCollector\PropelDataCollector - Propel\PropelBundle\DependencyInjection\Properties - Propel\PropelBundle\Form\Type\ModelType - Propel\PropelBundle\Twig\Extension\SyntaxExtension - Propel\PropelBundle\Form\PropelTypeGuesser - Propel\PropelBundle\Security\Acl\AuditableAclProvider - Propel\PropelBundle\Security\User\PropelUserProvider + Propel\Bundle\PropelBundle\Logger\PropelLogger + Propel\Bundle\PropelBundle\DataCollector\PropelDataCollector + Propel\Bundle\PropelBundle\DependencyInjection\Properties + Propel\Bundle\PropelBundle\Form\Type\ModelType + Propel\Bundle\PropelBundle\Twig\Extension\SyntaxExtension + Propel\Bundle\PropelBundle\Form\PropelTypeGuesser + Propel\Bundle\PropelBundle\Security\Acl\AuditableAclProvider + Propel\Bundle\PropelBundle\Security\User\PropelUserProvider diff --git a/Resources/doc/index.markdown b/Resources/doc/index.markdown index 37d853f..9ba3f3e 100644 --- a/Resources/doc/index.markdown +++ b/Resources/doc/index.markdown @@ -50,7 +50,7 @@ public function registerBundles() { $bundles = array( // ... - new Propel\PropelBundle\PropelBundle(), + new Propel\Bundle\PropelBundle\PropelBundle(), ); // ... diff --git a/Resources/doc/model_translation.markdown b/Resources/doc/model_translation.markdown index 03ae0b6..4c72447 100644 --- a/Resources/doc/model_translation.markdown +++ b/Resources/doc/model_translation.markdown @@ -7,7 +7,7 @@ To make us of this `ModelTranslation` you only need to add the translation resou ``` yaml services: translation.loader.propel: - class: Propel\PropelBundle\Translation\ModelTranslation + class: Propel\Bundle\PropelBundle\Translation\ModelTranslation arguments: # The model to be used. - 'Acme\Model\Translation\Translation' @@ -35,7 +35,7 @@ An example model schema for the translation model: ```xml - + @@ -68,7 +68,7 @@ In order to make use of the `VersionableBehavior` (or similar), you can map the ``` yaml services: translation.loader.propel: - class: Propel\PropelBundle\Translation\ModelTranslation + class: Propel\Bundle\PropelBundle\Translation\ModelTranslation arguments: - 'Acme\Model\Translation\Translation' - diff --git a/Resources/doc/unique_object_validator.markdown b/Resources/doc/unique_object_validator.markdown index 80db8a1..3d01ef3 100644 --- a/Resources/doc/unique_object_validator.markdown +++ b/Resources/doc/unique_object_validator.markdown @@ -24,7 +24,7 @@ You can specify this using the `validation.yml` file, like this: ``` yaml Acme\DemoBundle\Model\User: constraints: - - Propel\PropelBundle\Validator\Constraints\UniqueObject: + - Propel\Bundle\PropelBundle\Validator\Constraints\UniqueObject: fields: username ``` @@ -33,7 +33,7 @@ If you want to validate the uniqueness of more than just one field: ``` yaml Acme\DemoBundle\Model\User: constraints: - - Propel\PropelBundle\Validator\Constraints\UniqueObject: + - Propel\Bundle\PropelBundle\Validator\Constraints\UniqueObject: fields: [username, login] ``` @@ -42,7 +42,7 @@ Full configuration : ``` yaml Acme\DemoBundle\Model\User: constraints: - - Propel\PropelBundle\Validator\Constraints\UniqueObject: + - Propel\Bundle\PropelBundle\Validator\Constraints\UniqueObject: fields: [username, login] message: We already have a user with {{ fields }} messageFieldSeparator: " and " @@ -55,7 +55,7 @@ PHP You can also specify this using php. Fields can be specified as a string if there is only one field ``` php -use Propel\PropelBundle\Validator\Constraint\UniqueObject; +use Propel\Bundle\PropelBundle\Validator\Constraint\UniqueObject; ... @@ -110,7 +110,7 @@ You can also specify this using xml - + diff --git a/Resources/skeleton/FormType.php b/Resources/skeleton/FormType.php index 2afd3ea..021555d 100644 --- a/Resources/skeleton/FormType.php +++ b/Resources/skeleton/FormType.php @@ -2,7 +2,7 @@ namespace ##NAMESPACE##; -use Propel\PropelBundle\Form\BaseAbstractType; +use Propel\Bundle\PropelBundle\Form\BaseAbstractType; use Symfony\Component\Form\FormBuilderInterface; class ##CLASS## extends BaseAbstractType diff --git a/Security/User/PropelUserProvider.php b/Security/User/PropelUserProvider.php index 678cc10..4be73ca 100644 --- a/Security/User/PropelUserProvider.php +++ b/Security/User/PropelUserProvider.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Security\User; +namespace Propel\Bundle\PropelBundle\Security\User; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; diff --git a/Tests/Command/AbstractCommandTest.php b/Tests/Command/AbstractCommandTest.php index 71f3768..ebc83e9 100644 --- a/Tests/Command/AbstractCommandTest.php +++ b/Tests/Command/AbstractCommandTest.php @@ -7,11 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\Command; -namespace Propel\PropelBundle\Tests\Command; - -use Propel\PropelBundle\Tests\TestCase; -use Propel\PropelBundle\Command\AbstractCommand; +use Propel\Bundle\PropelBundle\Command\AbstractCommand; +use Propel\Bundle\PropelBundle\Tests\TestCase; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\KernelInterface; diff --git a/Tests/Command/DatabaseCreateCommandTest.php b/Tests/Command/DatabaseCreateCommandTest.php index 19e5048..d8f659e 100644 --- a/Tests/Command/DatabaseCreateCommandTest.php +++ b/Tests/Command/DatabaseCreateCommandTest.php @@ -7,11 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\Command; -namespace Propel\PropelBundle\Tests\Command; - -use Propel\PropelBundle\Tests\TestCase; -use Propel\PropelBundle\Command\DatabaseCreateCommand; +use Propel\Bundle\PropelBundle\Command\DatabaseCreateCommand; +use Propel\Bundle\PropelBundle\Tests\TestCase; /** * @author Warnar Boekkooi diff --git a/Tests/Command/FixturesLoadCommandTest.php b/Tests/Command/FixturesLoadCommandTest.php index 2c2f2f7..18241b0 100644 --- a/Tests/Command/FixturesLoadCommandTest.php +++ b/Tests/Command/FixturesLoadCommandTest.php @@ -7,14 +7,12 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\Command; -namespace Propel\PropelBundle\Tests\Command; - +use Propel\Bundle\PropelBundle\Command\FixturesLoadCommand; +use Propel\Bundle\PropelBundle\Tests\TestCase; use Symfony\Component\Filesystem\Filesystem; -use Propel\PropelBundle\Tests\TestCase; -use Propel\PropelBundle\Command\FixturesLoadCommand; - /** * @author Kévin Gomez */ diff --git a/Tests/Command/GeneratorAwareCommandTest.php b/Tests/Command/GeneratorAwareCommandTest.php index ffae504..05915b5 100644 --- a/Tests/Command/GeneratorAwareCommandTest.php +++ b/Tests/Command/GeneratorAwareCommandTest.php @@ -7,11 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\Command; -namespace Propel\PropelBundle\Tests\Command; - -use Propel\PropelBundle\Command\GeneratorAwareCommand; -use Propel\PropelBundle\Tests\TestCase; +use Propel\Bundle\PropelBundle\Command\GeneratorAwareCommand; +use Propel\Bundle\PropelBundle\Tests\TestCase; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/Tests/DataCollector/PropelDataCollectorTest.php b/Tests/DataCollector/PropelDataCollectorTest.php index fcf15af..9568b9c 100644 --- a/Tests/DataCollector/PropelDataCollectorTest.php +++ b/Tests/DataCollector/PropelDataCollectorTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Tests\DataCollector; +namespace Propel\Bundle\PropelBundle\Tests\DataCollector; -use Propel\PropelBundle\DataCollector\PropelDataCollector; -use Propel\PropelBundle\Tests\TestCase; +use Propel\Bundle\PropelBundle\DataCollector\PropelDataCollector; +use Propel\Bundle\PropelBundle\Tests\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -92,7 +92,7 @@ class PropelDataCollectorTest extends TestCase ->will($this->returnArgument(1)) ; - $logger = $this->getMock('\Propel\PropelBundle\Logger\PropelLogger'); + $logger = $this->getMock('\Propel\Bundle\PropelBundle\Logger\PropelLogger'); $logger ->expects($this->any()) ->method('getQueries') diff --git a/Tests/DataFixtures/Dumper/YamlDataDumperTest.php b/Tests/DataFixtures/Dumper/YamlDataDumperTest.php index 506051c..a2a595a 100644 --- a/Tests/DataFixtures/Dumper/YamlDataDumperTest.php +++ b/Tests/DataFixtures/Dumper/YamlDataDumperTest.php @@ -7,11 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\DataFixtures\Dumper; -namespace Propel\PropelBundle\Tests\DataFixtures\Dumper; - -use Propel\PropelBundle\Tests\DataFixtures\TestCase; -use Propel\PropelBundle\DataFixtures\Dumper\YamlDataDumper; +use Propel\Bundle\PropelBundle\DataFixtures\Dumper\YamlDataDumper; +use Propel\Bundle\PropelBundle\Tests\DataFixtures\TestCase; /** * @author William Durand @@ -21,13 +20,13 @@ class YamlDataDumperTest extends TestCase { public function testYamlDump() { - $author = new \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor(); + $author = new \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor(); $author->setName('A famous one')->save($this->con); $complementary = new \stdClass(); $complementary->first_word_date = '2012-01-01'; - $book = new \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book(); + $book = new \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book(); $book ->setName('An important one') ->setAuthorId(1) @@ -41,11 +40,11 @@ class YamlDataDumperTest extends TestCase $loader->dump($filename); $expected = << @@ -19,20 +18,20 @@ class DataWiperTest extends TestCase { public function testWipesExistingData() { - $author = new \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor(); + $author = new \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor(); $author->setName('Some famous author'); - $book = new \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book(); + $book = new \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book(); $book ->setName('Armageddon is near') ->setBookAuthor($author) ->save($this->con) ; - $savedBook = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelectOne(new \Criteria(), $this->con); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book', $savedBook, 'The fixture has been saved correctly.'); + $savedBook = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelectOne(new \Criteria(), $this->con); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book', $savedBook, 'The fixture has been saved correctly.'); - $builder = $this->getMockBuilder('Propel\PropelBundle\DataFixtures\Loader\DataWiper'); + $builder = $this->getMockBuilder('Propel\Bundle\PropelBundle\DataFixtures\Loader\DataWiper'); $wipeout = $builder ->setMethods(array('loadMapBuilders')) ->disableOriginalConstructor() @@ -40,7 +39,7 @@ class DataWiperTest extends TestCase ; $dbMap = new \DatabaseMap('default'); - $dbMap->addTableFromMapClass('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\map\BookTableMap'); + $dbMap->addTableFromMapClass('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\map\BookTableMap'); $reflection = new \ReflectionObject($wipeout); $property = $reflection->getProperty('dbMap'); $property->setAccessible(true); @@ -53,6 +52,6 @@ class DataWiperTest extends TestCase $wipeout->load(array(), 'default'); - $this->assertCount(0, \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con)); + $this->assertCount(0, \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con)); } } diff --git a/Tests/DataFixtures/Loader/XmlDataLoaderTest.php b/Tests/DataFixtures/Loader/XmlDataLoaderTest.php index 958fe8a..0d696a8 100644 --- a/Tests/DataFixtures/Loader/XmlDataLoaderTest.php +++ b/Tests/DataFixtures/Loader/XmlDataLoaderTest.php @@ -7,11 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\DataFixtures\Loader; -namespace Propel\PropelBundle\Tests\DataFixtures\Loader; - -use Propel\PropelBundle\Tests\DataFixtures\TestCase; -use Propel\PropelBundle\DataFixtures\Loader\XmlDataLoader; +use Propel\Bundle\PropelBundle\DataFixtures\Loader\XmlDataLoader; +use Propel\Bundle\PropelBundle\Tests\DataFixtures\TestCase; /** * @author William Durand @@ -23,10 +22,10 @@ class XmlDataLoaderTest extends TestCase { $fixtures = << - + - + @@ -37,10 +36,10 @@ XML; $loader = new XmlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader'); $loader->load(array($filename), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(1, $books); $book = $books[0]; - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor', $book->getBookAuthor()); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor', $book->getBookAuthor()); } } diff --git a/Tests/DataFixtures/Loader/YamlDataLoaderTest.php b/Tests/DataFixtures/Loader/YamlDataLoaderTest.php index 0755346..75165b5 100644 --- a/Tests/DataFixtures/Loader/YamlDataLoaderTest.php +++ b/Tests/DataFixtures/Loader/YamlDataLoaderTest.php @@ -7,11 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\DataFixtures\Loader; -namespace Propel\PropelBundle\Tests\DataFixtures\Loader; - -use Propel\PropelBundle\Tests\DataFixtures\TestCase; -use Propel\PropelBundle\DataFixtures\Loader\YamlDataLoader; +use Propel\Bundle\PropelBundle\DataFixtures\Loader\YamlDataLoader; +use Propel\Bundle\PropelBundle\Tests\DataFixtures\TestCase; /** * @author William Durand @@ -22,11 +21,11 @@ class YamlDataLoaderTest extends TestCase public function testYamlLoadOneToMany() { $fixtures = <<load(array($filename), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(1, $books); $book = $books[0]; - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor', $book->getBookAuthor()); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor', $book->getBookAuthor()); } public function testYamlLoadManyToMany() { $schema = << +
@@ -74,7 +73,7 @@ YAML; XML; $fixtures = <<load(array($filename), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookPeer::doSelect(new \Criteria(), $con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookPeer::doSelect(new \Criteria(), $con); $this->assertCount(2, $books); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBook', $books[0]); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBook', $books[1]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBook', $books[0]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBook', $books[1]); - $authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthorPeer::doSelect(new \Criteria(), $con); + $authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthorPeer::doSelect(new \Criteria(), $con); $this->assertCount(2, $authors); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthor', $authors[0]); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthor', $authors[1]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthor', $authors[0]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthor', $authors[1]); - $bookAuthors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthorPeer::doSelect(new \Criteria(), $con); + $bookAuthors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthorPeer::doSelect(new \Criteria(), $con); $this->assertCount(2, $bookAuthors); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthor', $bookAuthors[0]); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthor', $bookAuthors[1]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthor', $bookAuthors[0]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthor', $bookAuthors[1]); $this->assertEquals('Victor Hugo', $authors[1]->getName()); $this->assertTrue($authors[1]->getBooks()->contains($books[1])); @@ -129,7 +128,7 @@ YAML; public function testYamlLoadManyToManyMultipleFiles() { $schema = << +
@@ -155,29 +154,29 @@ YAML; XML; $fixtures1 = <<load(array($filename1, $filename2), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookPeer::doSelect(new \Criteria(), $con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookPeer::doSelect(new \Criteria(), $con); $this->assertCount(2, $books); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBook', $books[0]); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBook', $books[1]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBook', $books[0]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBook', $books[1]); - $authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthorPeer::doSelect(new \Criteria(), $con); + $authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthorPeer::doSelect(new \Criteria(), $con); $this->assertCount(2, $authors); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthor', $authors[0]); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthor', $authors[1]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthor', $authors[0]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthor', $authors[1]); - $bookAuthors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthorPeer::doSelect(new \Criteria(), $con); + $bookAuthors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthorPeer::doSelect(new \Criteria(), $con); $this->assertCount(2, $bookAuthors); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthor', $bookAuthors[0]); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthor', $bookAuthors[1]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthor', $bookAuthors[0]); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthor', $bookAuthors[1]); $this->assertEquals('Victor Hugo', $authors[1]->getName()); $this->assertTrue($authors[1]->getBooks()->contains($books[1])); @@ -217,7 +216,7 @@ YAML; public function testLoadSelfReferencing() { $fixtures = <<load(array($filename), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(0, $books); - $authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthorPeer::doSelect(new \Criteria(), $this->con); + $authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthorPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(1, $authors); $author = $authors[0]; @@ -244,7 +243,7 @@ YAML; public function testLoaderWithPhp() { $fixtures = << @@ -255,10 +254,10 @@ YAML; $loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader'); $loader->load(array($filename), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(0, $books); - $authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthorPeer::doSelect(new \Criteria(), $this->con); + $authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthorPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(1, $authors); $author = $authors[0]; @@ -268,7 +267,7 @@ YAML; public function testLoadWithoutFaker() { $fixtures = << @@ -279,10 +278,10 @@ YAML; $loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader'); $loader->load(array($filename), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(0, $books); - $authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthorPeer::doSelect(new \Criteria(), $this->con); + $authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthorPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(1, $authors); $author = $authors[0]; @@ -296,7 +295,7 @@ YAML; } $fixtures = << @@ -310,7 +309,7 @@ YAML; $loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', $container); $loader->load(array($filename), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookPeer::doSelect(new \Criteria(), $this->con); $this->assertCount(1, $books); $book = $books[0]; @@ -325,7 +324,7 @@ YAML; public function testLoadWithInheritedRelationship() { $schema = << +
@@ -352,11 +351,11 @@ YAML; XML; $fixtures = <<load(array($filename), 'default'); - $books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipBookPeer::doSelect(new \Criteria(), $con); + $books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipBookPeer::doSelect(new \Criteria(), $con); $this->assertCount(1, $books); $book = $books[0]; $author = $book->getAuthor(); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipAuthor', $author); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipAuthor', $author); } public function testLoadWithInheritedManyToManyRelationship() { $schema = << +
@@ -422,15 +421,15 @@ YAML; XML; $fixtures = <<load(array($filename), 'default'); - $authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedM2MRelationshipNobelizedAuthorPeer::doSelect(new \Criteria(), $con); + $authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedM2MRelationshipNobelizedAuthorPeer::doSelect(new \Criteria(), $con); $this->assertCount(1, $authors); $author = $authors[0]; @@ -457,7 +456,7 @@ YAML; public function testLoadArrayToObjectType() { $schema = << +
@@ -466,7 +465,7 @@ YAML; XML; $fixtures = <<load(array($filename), 'default'); - $book = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlBookWithObjectQuery::create(null, $con)->findOne(); + $book = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlBookWithObjectQuery::create(null, $con)->findOne(); - $this->assertInstanceOf('\Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlBookWithObject', $book); + $this->assertInstanceOf('\Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlBookWithObject', $book); $this->assertEquals(array('opt1' => 2012, 'opt2' => 140, 'inner' => array('subOpt' => 123)), $book->getOptions()); } public function testLoadDelegatedOnPrimaryKey() { $schema = << +
@@ -512,11 +511,11 @@ YAML; XML; $fixtures = <<load(array($filename), 'default'); - $authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyAuthorPeer::doSelect(new \Criteria(), $con); + $authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyAuthorPeer::doSelect(new \Criteria(), $con); $this->assertCount(1, $authors); $author = $authors[0]; $person = $author->getYamlDelegateOnPrimaryKeyPerson(); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyPerson', $person); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyPerson', $person); } } diff --git a/Tests/DataFixtures/TestCase.php b/Tests/DataFixtures/TestCase.php index 06017d8..acb7c6c 100644 --- a/Tests/DataFixtures/TestCase.php +++ b/Tests/DataFixtures/TestCase.php @@ -7,10 +7,9 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\DataFixtures; -namespace Propel\PropelBundle\Tests\DataFixtures; - -use Propel\PropelBundle\Tests\TestCase as BaseTestCase; +use Propel\Bundle\PropelBundle\Tests\TestCase as BaseTestCase; /** * @author Toni Uebernickel @@ -36,7 +35,7 @@ class TestCase extends BaseTestCase $this->loadPropelQuickBuilder(); $schema = << +
@@ -58,7 +57,7 @@ XML; $builder = new \PropelQuickBuilder(); $builder->setSchema($schema); - if (class_exists('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book')) { + if (class_exists('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book')) { $builder->setClassTargets(array()); } diff --git a/Tests/DependencyInjection/PropelExtensionTest.php b/Tests/DependencyInjection/PropelExtensionTest.php index c06e552..bb4af1f 100644 --- a/Tests/DependencyInjection/PropelExtensionTest.php +++ b/Tests/DependencyInjection/PropelExtensionTest.php @@ -7,12 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\DependencyInjection; -namespace Propel\PropelBundle\Tests\DependencyInjection; - -use Propel\PropelBundle\Tests\TestCase; -use Propel\PropelBundle\DependencyInjection\PropelExtension; -use Symfony\Component\DependencyInjection\Container; +use Propel\Bundle\PropelBundle\DependencyInjection\PropelExtension; +use Propel\Bundle\PropelBundle\Tests\TestCase; class PropelExtensionTest extends TestCase { diff --git a/Tests/Fixtures/Column.php b/Tests/Fixtures/Column.php index bc89d73..800bb10 100644 --- a/Tests/Fixtures/Column.php +++ b/Tests/Fixtures/Column.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Tests\Fixtures; +namespace Propel\Bundle\PropelBundle\Tests\Fixtures; class Column extends \ColumnMap { diff --git a/Tests/Fixtures/Item.php b/Tests/Fixtures/Item.php index 755dcf9..814e9dd 100644 --- a/Tests/Fixtures/Item.php +++ b/Tests/Fixtures/Item.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Tests\Fixtures; +namespace Propel\Bundle\PropelBundle\Tests\Fixtures; class Item implements \Persistent { diff --git a/Tests/Fixtures/ItemQuery.php b/Tests/Fixtures/ItemQuery.php index 5058be9..35f3168 100644 --- a/Tests/Fixtures/ItemQuery.php +++ b/Tests/Fixtures/ItemQuery.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Tests\Fixtures; +namespace Propel\Bundle\PropelBundle\Tests\Fixtures; class ItemQuery { diff --git a/Tests/Fixtures/Model/Book.php b/Tests/Fixtures/Model/Book.php index 184e0eb..6416ea0 100644 --- a/Tests/Fixtures/Model/Book.php +++ b/Tests/Fixtures/Model/Book.php @@ -1,8 +1,8 @@ setName('book'); $this->setPhpName('Book'); - $this->setClassname('Propel\\PropelBundle\\Tests\\Fixtures\\Model\\Book'); + $this->setClassname('Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\Model\\Book'); $this->setPackage('vendor/bundles/Propel/PropelBundle/Tests/Fixtures/Model'); $this->setUseIdGenerator(true); // columns diff --git a/Tests/Fixtures/Model/om/BaseBook.php b/Tests/Fixtures/Model/om/BaseBook.php index 2ddae71..2073b57 100644 --- a/Tests/Fixtures/Model/om/BaseBook.php +++ b/Tests/Fixtures/Model/om/BaseBook.php @@ -1,17 +1,17 @@ - +
diff --git a/Tests/Form/ChoiceList/CompatModelChoiceListTest.php b/Tests/Form/ChoiceList/CompatModelChoiceListTest.php index d164831..08892e4 100644 --- a/Tests/Form/ChoiceList/CompatModelChoiceListTest.php +++ b/Tests/Form/ChoiceList/CompatModelChoiceListTest.php @@ -1,18 +1,18 @@ query = $this->getMock('Propel\PropelBundle\Tests\Fixtures\ItemQuery', array( + $this->query = $this->getMock('Propel\Bundle\PropelBundle\Tests\Fixtures\ItemQuery', array( 'filterById', ), array(), '', true, true, true, false, true); diff --git a/Tests/Form/ChoiceList/ModelChoiceListTest.php b/Tests/Form/ChoiceList/ModelChoiceListTest.php index 350b5c5..3112bbf 100644 --- a/Tests/Form/ChoiceList/ModelChoiceListTest.php +++ b/Tests/Form/ChoiceList/ModelChoiceListTest.php @@ -9,18 +9,18 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Tests\Form\ChoiceList; +namespace Propel\Bundle\PropelBundle\Tests\Form\ChoiceList; -use Propel\PropelBundle\Form\ChoiceList\ModelChoiceList; -use Propel\PropelBundle\Tests\Fixtures\Item; -use Propel\PropelBundle\Tests\Fixtures\ItemQuery; -use Propel\PropelBundle\Tests\Fixtures\ReadOnlyItem; -use Propel\PropelBundle\Tests\TestCase; +use Propel\Bundle\PropelBundle\Form\ChoiceList\ModelChoiceList; +use Propel\Bundle\PropelBundle\Tests\Fixtures\Item; +use Propel\Bundle\PropelBundle\Tests\Fixtures\ItemQuery; +use Propel\Bundle\PropelBundle\Tests\Fixtures\ReadOnlyItem; +use Propel\Bundle\PropelBundle\Tests\TestCase; use Symfony\Component\Form\Extension\Core\View\ChoiceView; class ModelChoiceListTest extends TestCase { - const ITEM_CLASS = '\Propel\PropelBundle\Tests\Fixtures\Item'; + const ITEM_CLASS = '\Propel\Bundle\PropelBundle\Tests\Fixtures\Item'; protected function setUp() { @@ -42,7 +42,7 @@ class ModelChoiceListTest extends TestCase { $item = new ReadOnlyItem(); $choiceList = new ModelChoiceList( - '\Propel\PropelBundle\Tests\Fixtures\ReadOnlyItem', + '\Propel\Bundle\PropelBundle\Tests\Fixtures\ReadOnlyItem', 'name', array( $item, diff --git a/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php b/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php index 06a7123..7b05875 100644 --- a/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php +++ b/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Tests\Form\DataTransformer; +namespace Propel\Bundle\PropelBundle\Tests\Form\DataTransformer; -use Propel\PropelBundle\Form\DataTransformer\CollectionToArrayTransformer; -use Propel\PropelBundle\Tests\TestCase; +use Propel\Bundle\PropelBundle\Form\DataTransformer\CollectionToArrayTransformer; +use Propel\Bundle\PropelBundle\Tests\TestCase; class CollectionToArrayTransformerTest extends TestCase { diff --git a/Tests/Form/PropelTypeGuesserTest.php b/Tests/Form/PropelTypeGuesserTest.php index a801ee6..d196a1c 100644 --- a/Tests/Form/PropelTypeGuesserTest.php +++ b/Tests/Form/PropelTypeGuesserTest.php @@ -9,16 +9,16 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Tests\Form; +namespace Propel\Bundle\PropelBundle\Tests\Form; -use Propel\PropelBundle\Form\PropelTypeGuesser; -use Propel\PropelBundle\Tests\TestCase; +use Propel\Bundle\PropelBundle\Form\PropelTypeGuesser; +use Propel\Bundle\PropelBundle\Tests\TestCase; use Symfony\Component\Form\Guess\Guess; class PropelTypeGuesserTest extends TestCase { - const CLASS_NAME = 'Propel\PropelBundle\Tests\Fixtures\Item'; - const UNKNOWN_CLASS_NAME = 'Propel\PropelBundle\Tests\Fixtures\UnknownItem'; + const CLASS_NAME = 'Propel\Bundle\PropelBundle\Tests\Fixtures\Item'; + const UNKNOWN_CLASS_NAME = 'Propel\Bundle\PropelBundle\Tests\Fixtures\UnknownItem'; private $guesser; diff --git a/Tests/Form/Type/TranslationCollectionTypeTest.php b/Tests/Form/Type/TranslationCollectionTypeTest.php index 2489b05..ad369ea 100644 --- a/Tests/Form/Type/TranslationCollectionTypeTest.php +++ b/Tests/Form/Type/TranslationCollectionTypeTest.php @@ -9,19 +9,19 @@ * file that was distributed with this source code. */ -namespace Propel\PropelBundle\Tests\Form\Type; +namespace Propel\Bundle\PropelBundle\Tests\Form\Type; -use Propel\PropelBundle\Form\PropelExtension; -use Propel\PropelBundle\Tests\Fixtures\Item; -use Propel\PropelBundle\Tests\Fixtures\TranslatableItem; -use Propel\PropelBundle\Tests\Fixtures\TranslatableItemI18n; +use Propel\Bundle\PropelBundle\Form\PropelExtension; +use Propel\Bundle\PropelBundle\Tests\Fixtures\Item; +use Propel\Bundle\PropelBundle\Tests\Fixtures\TranslatableItem; +use Propel\Bundle\PropelBundle\Tests\Fixtures\TranslatableItemI18n; use Symfony\Component\Form\Test\TypeTestCase; class TranslationCollectionTypeTest extends TypeTestCase { - const TRANSLATION_CLASS = 'Propel\PropelBundle\Tests\Fixtures\TranslatableItem'; - const TRANSLATABLE_I18N_CLASS = 'Propel\PropelBundle\Tests\Fixtures\TranslatableItemI18n'; - const NON_TRANSLATION_CLASS = 'Propel\PropelBundle\Tests\Fixtures\Item'; + const TRANSLATION_CLASS = 'Propel\Bundle\PropelBundle\Tests\Fixtures\TranslatableItem'; + const TRANSLATABLE_I18N_CLASS = 'Propel\Bundle\PropelBundle\Tests\Fixtures\TranslatableItemI18n'; + const NON_TRANSLATION_CLASS = 'Propel\Bundle\PropelBundle\Tests\Fixtures\Item'; protected function getExtensions() { diff --git a/Tests/Request/ParamConverter/PropelParamConverterTest.php b/Tests/Request/ParamConverter/PropelParamConverterTest.php index d4daa3b..d13d515 100644 --- a/Tests/Request/ParamConverter/PropelParamConverterTest.php +++ b/Tests/Request/ParamConverter/PropelParamConverterTest.php @@ -1,18 +1,16 @@ 'Propel\PropelBundle\Tests\Fixtures\Model\Book')); + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book')); $this->assertTrue($paramConverter->supports($configuration), 'param converter should support propel class'); $configuration = new ParamConverter(array('class' =>'fakeClass')); $this->assertFalse($paramConverter->supports($configuration), 'param converter should not support wrong class'); - $configuration = new ParamConverter(array('class' =>'Propel\PropelBundle\Tests\TestCase')); + $configuration = new ParamConverter(array('class' =>'Propel\Bundle\PropelBundle\Tests\TestCase')); $this->assertFalse($paramConverter->supports($configuration), 'param converter should not support wrong class'); } @@ -51,10 +49,10 @@ class PropelParamConverterTest extends TestCase { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('id' => 1, 'book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); $paramConverter->apply($request, $configuration); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Fixtures\Model\Book"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book"'); } /** @@ -64,7 +62,7 @@ class PropelParamConverterTest extends TestCase { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('id' => 2, 'book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); $paramConverter->apply($request, $configuration); } @@ -72,21 +70,21 @@ class PropelParamConverterTest extends TestCase { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('slug' => 'my-book', 'book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); $paramConverter->apply($request, $configuration); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Fixtures\Model\Book"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book"'); } public function testParamConverterFindCamelCasedSlug() { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('author_slug' => 'my-author', 'slug' => 'my-kewl-book', 'book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); $paramConverter->apply($request, $configuration); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Fixtures\Model\Book"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book"'); } /** @@ -96,7 +94,7 @@ class PropelParamConverterTest extends TestCase { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('slug' => 'my-foo', 'book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); $paramConverter->apply($request, $configuration); } @@ -105,11 +103,11 @@ class PropelParamConverterTest extends TestCase $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('slug' => 'my-book', 'name' => 'foo', 'book' => null)); $configuration = new ParamConverter(array( - 'class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book', + 'class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book', 'options' => array('exclude' => array('name')))); $paramConverter->apply($request, $configuration); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Fixtures\Model\Book"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book"'); } /** @@ -120,11 +118,11 @@ class PropelParamConverterTest extends TestCase $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('slug' => 'my-book', 'name' => 'foo', 'book' => null)); $configuration = new ParamConverter(array( - 'class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book', + 'class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book', 'options' => array('exclude' => array('name', 'slug')))); $paramConverter->apply($request, $configuration); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Fixtures\Model\Book"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book"'); } /** @@ -135,11 +133,11 @@ class PropelParamConverterTest extends TestCase $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('id' => '1234', 'book' => null)); $configuration = new ParamConverter(array( - 'class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book', + 'class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book', 'options' => array('exclude' => array('id')))); $paramConverter->apply($request, $configuration); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Fixtures\Model\Book"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book"'); } /** @@ -149,7 +147,7 @@ class PropelParamConverterTest extends TestCase { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); $paramConverter->apply($request, $configuration); } @@ -157,7 +155,7 @@ class PropelParamConverterTest extends TestCase { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book')); $configuration->setIsOptional(true); $paramConverter->apply($request, $configuration); @@ -169,26 +167,26 @@ class PropelParamConverterTest extends TestCase { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('toto' => 1, 'book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book', 'options' => array('mapping' => array('toto' => 'id')) )); $paramConverter->apply($request, $configuration); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Fixtures\Model\Book"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book"'); } public function testParamConverterFindSlugWithMapping() { $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('slugParam_special' => 'my-book', 'book' => null)); - $configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book', + $configuration = new ParamConverter(array('class' => 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book', 'name' => 'book', 'options' => array('mapping' => array('slugParam_special' => 'slug')) )); $paramConverter->apply($request, $configuration); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Fixtures\Model\Book"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book',$request->attributes->get('book'), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book"'); } public function testParamConvertWithOptionWith() @@ -198,7 +196,7 @@ class PropelParamConverterTest extends TestCase $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('id' => 1, 'book' => null)); $configuration = new ParamConverter(array( - 'class' => 'Propel\PropelBundle\Tests\Request\ParamConverter\MyBook', + 'class' => 'Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyBook', 'name' => 'book', 'options' => array( 'with' => 'MyAuthor' @@ -209,13 +207,13 @@ class PropelParamConverterTest extends TestCase $paramConverter->apply($request, $configuration); $book = $request->attributes->get('book'); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Request\ParamConverter\MyBook', $book, - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Request\ParamConverter\MyBook"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyBook', $book, + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyBook"'); $this->assertEquals($nb +1, $this->con->getQueryCount(), 'only one query to get the book'); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor', $book->getMyAuthor(), - 'param "book" should be an instance of "Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor', $book->getMyAuthor(), + 'param "book" should be an instance of "Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor"'); $this->assertEquals($nb +1, $this->con->getQueryCount(), 'no new query to get the author'); \Propel::enableInstancePooling(); @@ -228,7 +226,7 @@ class PropelParamConverterTest extends TestCase $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('param1' => 10, 'author' => null)); $configuration = new ParamConverter(array( - 'class' => 'Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor', + 'class' => 'Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor', 'name' => 'author', 'options' => array( 'with' => array(array('MyBook', 'left join')), @@ -240,8 +238,8 @@ class PropelParamConverterTest extends TestCase $paramConverter->apply($request, $configuration); $author = $request->attributes->get('author'); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor', $author, - 'param "author" should be an instance of "Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor', $author, + 'param "author" should be an instance of "Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor"'); $this->assertEquals($nb + 1, $this->con->getQueryCount(), 'only one query to get the book'); @@ -259,7 +257,7 @@ class PropelParamConverterTest extends TestCase $paramConverter = new PropelParamConverter(); $request = new Request(array(), array(), array('id' => 10, 'author' => null)); $configuration = new ParamConverter(array( - 'class' => 'Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor', + 'class' => 'Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor', 'name' => 'author', 'options' => array( 'with' => array(array('MyBook', 'left join')), @@ -270,8 +268,8 @@ class PropelParamConverterTest extends TestCase $paramConverter->apply($request, $configuration); $author = $request->attributes->get('author'); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor', $author, - 'param "author" should be an instance of "Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor', $author, + 'param "author" should be an instance of "Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor"'); $this->assertEquals($nb + 1, $this->con->getQueryCount(), 'only one query to get the book'); @@ -313,7 +311,7 @@ class PropelParamConverterTest extends TestCase )); $configuration = new ParamConverter(array( - 'class' => 'Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor', + 'class' => 'Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor', 'name' => 'author', 'options' => array(), )); @@ -321,8 +319,8 @@ class PropelParamConverterTest extends TestCase $paramConverter->apply($request, $configuration); $author = $request->attributes->get('author'); - $this->assertInstanceOf('Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor', $author, - 'param "author" should be an instance of "Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor"'); + $this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor', $author, + 'param "author" should be an instance of "Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor"'); } protected function loadFixtures() @@ -331,7 +329,7 @@ class PropelParamConverterTest extends TestCase $schema = << + namespace="Propel\Bundle\PropelBundle\Tests\Request\ParamConverter" defaultIdMethod="native">
@@ -351,7 +349,7 @@ XML; $builder = new \PropelQuickBuilder(); $builder->setSchema($schema); - if (class_exists('Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor')) { + if (class_exists('Propel\Bundle\PropelBundle\Tests\Request\ParamConverter\MyAuthor')) { $builder->setClassTargets(array()); } diff --git a/Tests/Security/User/PropelUserProviderTest.php b/Tests/Security/User/PropelUserProviderTest.php index 26759a9..4451e2f 100644 --- a/Tests/Security/User/PropelUserProviderTest.php +++ b/Tests/Security/User/PropelUserProviderTest.php @@ -7,11 +7,11 @@ * * @license MIT License */ -namespace Propel\PropelBundle\Tests\Security\User; +namespace Propel\Bundle\PropelBundle\Tests\Security\User; -use Propel\PropelBundle\Security\User\PropelUserProvider; -use Propel\PropelBundle\Tests\Fixtures\Model\User; -use Propel\PropelBundle\Tests\TestCase; +use Propel\Bundle\PropelBundle\Security\User\PropelUserProvider; +use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\User; +use Propel\Bundle\PropelBundle\Tests\TestCase; /** * @author William Durand @@ -23,7 +23,7 @@ class PropelUserProviderTest extends TestCase $this->loadPropelQuickBuilder(); $schema = << +
@@ -52,7 +52,7 @@ SCHEMA; $user2->setUsername('user2'); $user2->save(); - $provider = new PropelUserProvider('Propel\PropelBundle\Tests\Fixtures\Model\User', 'username'); + $provider = new PropelUserProvider('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\User', 'username'); // try to change the user identity $user1->setUsername('user2'); diff --git a/Tests/TestCase.php b/Tests/TestCase.php index 9bebac5..eaada15 100644 --- a/Tests/TestCase.php +++ b/Tests/TestCase.php @@ -7,8 +7,7 @@ * * @license MIT License */ - -namespace Propel\PropelBundle\Tests; +namespace Propel\Bundle\PropelBundle\Tests; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; diff --git a/Tests/Translation/ModelTranslationTest.php b/Tests/Translation/ModelTranslationTest.php index a41993c..39c2a51 100644 --- a/Tests/Translation/ModelTranslationTest.php +++ b/Tests/Translation/ModelTranslationTest.php @@ -1,22 +1,20 @@ * - * @covers Propel\PropelBundle\Translation\ModelTranslation + * @covers Propel\Bundle\PropelBundle\Translation\ModelTranslation */ class ModelTranslationTest extends TestCase { - const MODEL_CLASS = 'Propel\PropelBundle\Tests\Fixtures\Model\Translation'; + const MODEL_CLASS = 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Translation'; /** * @var \PropelPDO @@ -33,7 +31,7 @@ class ModelTranslationTest extends TestCase $builder = new \PropelQuickBuilder(); $builder->setSchema($schema); - if (class_exists('Propel\PropelBundle\Tests\Fixtures\Model\map\TranslationTableMap')) { + if (class_exists('Propel\Bundle\PropelBundle\Tests\Fixtures\Model\map\TranslationTableMap')) { $builder->setClassTargets(array()); } diff --git a/Tests/Util/PropelInflectorTest.php b/Tests/Util/PropelInflectorTest.php index 0ebfa02..fc5ddd5 100644 --- a/Tests/Util/PropelInflectorTest.php +++ b/Tests/Util/PropelInflectorTest.php @@ -7,11 +7,10 @@ * * @license MIT License */ +namespace Propel\Bundle\PropelBundle\Tests\Util; -namespace Propel\PropelBundle\Tests\Util; - -use Propel\PropelBundle\Tests\TestCase; -use Propel\PropelBundle\Util\PropelInflector; +use Propel\Bundle\PropelBundle\Tests\TestCase; +use Propel\Bundle\PropelBundle\Util\PropelInflector; /** * @author William Durand diff --git a/Translation/ModelTranslation.php b/Translation/ModelTranslation.php index 6380ce6..e281d4c 100644 --- a/Translation/ModelTranslation.php +++ b/Translation/ModelTranslation.php @@ -1,6 +1,6 @@