introduce Propel\Bundle\PropelBundle namespace

This commit is contained in:
Toni Uebernickel 2016-01-23 21:41:17 +01:00
parent b50691f199
commit 4db28b7bbd
96 changed files with 359 additions and 426 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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;

View file

@ -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
*

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\Command;
namespace Propel\Bundle\PropelBundle\Command;
/**
* @author Fabien Potencier <fabien.potencier@symfony-project.com>

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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.

View file

@ -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;

View file

@ -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;

View file

@ -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;
/**

View file

@ -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.

View file

@ -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.

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\DataFixtures\Dumper;
namespace Propel\Bundle\PropelBundle\DataFixtures\Dumper;
use Symfony\Component\Yaml\Yaml;

View file

@ -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.

View file

@ -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.

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\DataFixtures\Loader;
namespace Propel\Bundle\PropelBundle\DataFixtures\Loader;
/**
* @author Toni Uebernickel <tuebernickel@gmail.com>

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\DataFixtures\Loader;
namespace Propel\Bundle\PropelBundle\DataFixtures\Loader;
/**
* XML fixtures loader.

View file

@ -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;

View file

@ -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;

View file

@ -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.

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\DependencyInjection;
namespace Propel\Bundle\PropelBundle\DependencyInjection;
/**
* Properties.

View file

@ -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;

View file

@ -1,6 +1,6 @@
<?php
namespace Propel\PropelBundle\Form;
namespace Propel\Bundle\PropelBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

View file

@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form\ChoiceList;
namespace Propel\Bundle\PropelBundle\Form\ChoiceList;
use Propel\PropelBundle\Form\Type\ModelType;
use Propel\Bundle\PropelBundle\Form\Type\ModelType;
use Symfony\Component\Form\Exception\StringCastException;
use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList;
use Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer;

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form\DataTransformer;
namespace Propel\Bundle\PropelBundle\Form\DataTransformer;
use PropelObjectCollection;
use Symfony\Component\Form\DataTransformerInterface;

View file

@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form\EventListener;
namespace Propel\Bundle\PropelBundle\Form\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\Exception\UnexpectedTypeException;

View file

@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form\EventListener;
namespace Propel\Bundle\PropelBundle\Form\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvent;

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form;
namespace Propel\Bundle\PropelBundle\Form;
use Symfony\Component\Form\AbstractExtension;
use Symfony\Component\PropertyAccess\PropertyAccess;

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form;
namespace Propel\Bundle\PropelBundle\Form;
use Symfony\Component\Form\FormTypeGuesserInterface;
use Symfony\Component\Form\Guess\Guess;

View file

@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form\Type;
namespace Propel\Bundle\PropelBundle\Form\Type;
use Propel\PropelBundle\Form\ChoiceList\ModelChoiceList;
use Propel\PropelBundle\Form\DataTransformer\CollectionToArrayTransformer;
use Propel\Bundle\PropelBundle\Form\ChoiceList\ModelChoiceList;
use Propel\Bundle\PropelBundle\Form\DataTransformer\CollectionToArrayTransformer;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Options;

View file

@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form\Type;
namespace Propel\Bundle\PropelBundle\Form\Type;
use Propel\PropelBundle\Form\EventListener\TranslationCollectionFormListener;
use Propel\Bundle\PropelBundle\Form\EventListener\TranslationCollectionFormListener;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;

View file

@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Form\Type;
namespace Propel\Bundle\PropelBundle\Form\Type;
use Propel\PropelBundle\Form\EventListener\TranslationFormListener;
use Propel\Bundle\PropelBundle\Form\EventListener\TranslationFormListener;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Logger;
namespace Propel\Bundle\PropelBundle\Logger;
use Psr\Log\LoggerInterface;
use Symfony\Component\Stopwatch\Stopwatch;

View file

@ -7,9 +7,9 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle;
namespace Propel\Bundle\PropelBundle;
use Propel\PropelBundle\DependencyInjection\Security\UserProvider\PropelFactory;
use Propel\Bundle\PropelBundle\DependencyInjection\Security\UserProvider\PropelFactory;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

View file

@ -1,12 +1,12 @@
<?php
namespace Propel\PropelBundle\Request\ParamConverter;
namespace Propel\Bundle\PropelBundle\Request\ParamConverter;
use Propel\PropelBundle\Util\PropelInflector;
use Propel\Bundle\PropelBundle\Util\PropelInflector;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\RouterInterface;
/**

View file

@ -5,7 +5,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="propel.converter.propel.class">Propel\PropelBundle\Request\ParamConverter\PropelParamConverter</parameter>
<parameter key="propel.converter.propel.class">Propel\Bundle\PropelBundle\Request\ParamConverter\PropelParamConverter</parameter>
</parameters>
<services>

View file

@ -7,14 +7,14 @@
<parameters>
<parameter key="propel.dbal.default_connection">default</parameter>
<parameter key="propel.configuration.class">PropelConfiguration</parameter>
<parameter key="propel.logger.class">Propel\PropelBundle\Logger\PropelLogger</parameter>
<parameter key="propel.data_collector.class">Propel\PropelBundle\DataCollector\PropelDataCollector</parameter>
<parameter key="propel.build_properties.class">Propel\PropelBundle\DependencyInjection\Properties</parameter>
<parameter key="propel.form.type.model.class">Propel\PropelBundle\Form\Type\ModelType</parameter>
<parameter key="propel.twig.extension.syntax.class">Propel\PropelBundle\Twig\Extension\SyntaxExtension</parameter>
<parameter key="form.type_guesser.propel.class">Propel\PropelBundle\Form\PropelTypeGuesser</parameter>
<parameter key="propel.security.acl.provider.model.class">Propel\PropelBundle\Security\Acl\AuditableAclProvider</parameter>
<parameter key="propel.security.user.provider.class">Propel\PropelBundle\Security\User\PropelUserProvider</parameter>
<parameter key="propel.logger.class">Propel\Bundle\PropelBundle\Logger\PropelLogger</parameter>
<parameter key="propel.data_collector.class">Propel\Bundle\PropelBundle\DataCollector\PropelDataCollector</parameter>
<parameter key="propel.build_properties.class">Propel\Bundle\PropelBundle\DependencyInjection\Properties</parameter>
<parameter key="propel.form.type.model.class">Propel\Bundle\PropelBundle\Form\Type\ModelType</parameter>
<parameter key="propel.twig.extension.syntax.class">Propel\Bundle\PropelBundle\Twig\Extension\SyntaxExtension</parameter>
<parameter key="form.type_guesser.propel.class">Propel\Bundle\PropelBundle\Form\PropelTypeGuesser</parameter>
<parameter key="propel.security.acl.provider.model.class">Propel\Bundle\PropelBundle\Security\Acl\AuditableAclProvider</parameter>
<parameter key="propel.security.user.provider.class">Propel\Bundle\PropelBundle\Security\User\PropelUserProvider</parameter>
</parameters>
<services>

View file

@ -50,7 +50,7 @@ public function registerBundles()
{
$bundles = array(
// ...
new Propel\PropelBundle\PropelBundle(),
new Propel\Bundle\PropelBundle\PropelBundle(),
);
// ...

View file

@ -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
<?xml version="1.0" encoding="UTF-8"?>
<database name="translation" defaultIdMethod="native" namespace="Propel\PropelBundle\Tests\Fixtures\Model">
<database name="translation" defaultIdMethod="native" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\Model">
<table name="translation">
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
<column name="key" type="varchar" size="255" required="true" primaryString="true" />
@ -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'
-

View file

@ -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
<class name="Acme\DemoBundle\Model\User">
<constraint name="Propel\PropelBundle\Validator\Constraints\UniqueObject">
<constraint name="Propel\Bundle\PropelBundle\Validator\Constraints\UniqueObject">
<option name="fields">username</option>
<option name="message">We already have a user with {{ fields }}</option>
<option name="messageFieldSeparator"> and </option>

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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 <warnar@boekkooi.net>

View file

@ -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 <contact@kevingomez.fr>
*/

View file

@ -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;
/**

View file

@ -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')

View file

@ -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 <william.durand1@gmail.com>
@ -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 = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
BookAuthor_1:
id: '1'
name: 'A famous one'
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book:
Book_1:
id: '1'
name: 'An important one'

View file

@ -7,10 +7,9 @@
*
* @license MIT License
*/
namespace Propel\Bundle\PropelBundle\Tests\DataFixtures\Loader;
namespace Propel\PropelBundle\Tests\DataFixtures\Loader;
use Propel\PropelBundle\Tests\DataFixtures\TestCase;
use Propel\Bundle\PropelBundle\Tests\DataFixtures\TestCase;
/**
* @author Toni Uebernickel <tuebernickel@gmail.com>
@ -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));
}
}

View file

@ -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 <william.durand1@gmail.com>
@ -23,10 +22,10 @@ class XmlDataLoaderTest extends TestCase
{
$fixtures = <<<XML
<Fixtures>
<BookAuthor Namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader">
<BookAuthor Namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader">
<BookAuthor_1 id="1" name="A famous one" />
</BookAuthor>
<Book Namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader">
<Book Namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader">
<Book_1 id="1" name="An important one" author_id="BookAuthor_1" />
</Book>
</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());
}
}

View file

@ -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 <william.durand1@gmail.com>
@ -22,11 +21,11 @@ class YamlDataLoaderTest extends TestCase
public function testYamlLoadOneToMany()
{
$fixtures = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
BookAuthor_1:
id: '1'
name: 'A famous one'
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book:
Book_1:
id: '1'
name: 'An important one'
@ -38,17 +37,17 @@ 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(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 = <<<XML
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<table name="table_book" phpName="YamlManyToManyBook">
<column name="id" type="integer" primaryKey="true" />
<column name="name" type="varchar" size="255" />
@ -74,7 +73,7 @@ YAML;
XML;
$fixtures = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBook:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBook:
Book_1:
id: 1
name: 'An important one'
@ -82,7 +81,7 @@ Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBook:
id: 2
name: 'Les misérables'
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthor:
Author_1:
id: 1
name: 'A famous one'
@ -91,7 +90,7 @@ Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthor:
name: 'Victor Hugo'
table_book_authors: [ Book_2 ]
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthor:
BookAuthor_1:
book_id: Book_1
author_id: Author_1
@ -106,20 +105,20 @@ YAML;
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader');
$loader->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 = <<<XML
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<table name="table_book_multiple" phpName="YamlManyToManyMultipleFilesBook">
<column name="id" type="integer" primaryKey="true" />
<column name="name" type="varchar" size="255" />
@ -155,29 +154,29 @@ YAML;
XML;
$fixtures1 = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBook:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBook:
Book_2:
id: 2
name: 'Les misérables'
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthor:
Author_1:
id: 1
name: 'A famous one'
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthor:
BookAuthor_1:
book_id: Book_1
author_id: Author_1
YAML;
$fixtures2 = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBook:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBook:
Book_1:
id: 1
name: 'An important one'
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthor:
Author_2:
id: 2
name: 'Victor Hugo'
@ -194,20 +193,20 @@ YAML;
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader');
$loader->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 = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
BookAuthor_1:
id: '1'
name: 'to be announced'
@ -231,10 +230,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];
@ -244,7 +243,7 @@ YAML;
public function testLoaderWithPhp()
{
$fixtures = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
BookAuthor_1:
id: '1'
name: <?php echo "to be announced"; ?>
@ -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 = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\BookAuthor:
BookAuthor_1:
id: '1'
name: <?php echo \$faker('word'); ?>
@ -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 = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\Book:
Book_1:
id: '1'
name: <?php \$faker('word'); ?>
@ -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 = <<<XML
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<table name="table_book_inherited_relationship" phpName="YamlInheritedRelationshipBook">
<column name="id" type="integer" primaryKey="true" autoIncrement="true" />
@ -352,11 +351,11 @@ YAML;
XML;
$fixtures = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipNobelizedAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipNobelizedAuthor:
NobelizedAuthor_1:
nobel_year: 2012
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipBook:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipBook:
Book_1:
name: 'Supplice du santal'
author_id: NobelizedAuthor_1
@ -371,18 +370,18 @@ YAML;
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader');
$loader->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 = <<<XML
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<table name="table_book_inherited_m2m_relationship" phpName="YamlInheritedM2MRelationshipBook">
<column name="id" type="integer" primaryKey="true" autoIncrement="true" />
@ -422,15 +421,15 @@ YAML;
XML;
$fixtures = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedM2MRelationshipBook:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedM2MRelationshipBook:
Book_1:
name: 'Supplice du santal'
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedM2MRelationshipHistoryBook:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedM2MRelationshipHistoryBook:
Book_2:
name: 'Qiushui'
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedM2MRelationshipNobelizedAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedM2MRelationshipNobelizedAuthor:
NobelizedAuthor_1:
nobel_year: 2012
table_book_author_inherited_m2m_relationships: [Book_1, Book_2]
@ -446,7 +445,7 @@ YAML;
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader');
$loader->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 = <<<XML
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<table name="table_book_with_object" phpName="YamlBookWithObject">
<column name="id" type="integer" primaryKey="true" />
<column name="name" type="varchar" size="255" />
@ -466,7 +465,7 @@ YAML;
</database>
XML;
$fixtures = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlBookWithObject:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlBookWithObject:
book1:
name: my book
options: {opt1: 2012, opt2: 140, inner: {subOpt: 123}}
@ -481,16 +480,16 @@ YAML;
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader');
$loader->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 = <<<XML
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<table name="yaml_delegate_on_primary_key_person" phpName="YamlDelegateOnPrimaryKeyPerson">
<column name="id" type="integer" primaryKey="true" autoIncrement="true" />
<column name="name" type="varchar" size="255" />
@ -512,11 +511,11 @@ YAML;
XML;
$fixtures = <<<YAML
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyPerson:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyPerson:
yaml_delegate_on_primary_key_person_1:
name: "Some Persons Name"
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyAuthor:
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyAuthor:
yaml_delegate_on_primary_key_author_1:
id: yaml_delegate_on_primary_key_person_1
count_books: 7
@ -531,11 +530,11 @@ YAML;
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader');
$loader->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);
}
}

View file

@ -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 <tuebernickel@gmail.com>
@ -36,7 +35,7 @@ class TestCase extends BaseTestCase
$this->loadPropelQuickBuilder();
$schema = <<<XML
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
<table name="book">
<column name="id" type="integer" primaryKey="true" />
<column name="name" type="varchar" size="255" />
@ -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());
}

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -1,8 +1,8 @@
<?php
namespace Propel\PropelBundle\Tests\Fixtures\Model;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model;
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBook;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\om\BaseBook;
/**
* Skeleton subclass for representing a row from the 'book' table.

View file

@ -1,8 +1,8 @@
<?php
namespace Propel\PropelBundle\Tests\Fixtures\Model;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model;
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBookPeer;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\om\BaseBookPeer;
/**
* Skeleton subclass for performing query and update operations on the 'book' table.

View file

@ -1,8 +1,8 @@
<?php
namespace Propel\PropelBundle\Tests\Fixtures\Model;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model;
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBookQuery;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\om\BaseBookQuery;
/**
* Skeleton subclass for performing query and update operations on the 'book' table.

View file

@ -1,8 +1,8 @@
<?php
namespace Propel\PropelBundle\Tests\Fixtures\Model;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model;
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseUser;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\om\BaseUser;
use Symfony\Component\Security\Core\User\UserInterface;
class User extends BaseUser implements UserInterface

View file

@ -1,6 +1,6 @@
<?php
namespace Propel\PropelBundle\Tests\Fixtures\Model\map;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model\map;
use \RelationMap;
use \TableMap;
@ -36,7 +36,7 @@ class BookTableMap extends TableMap
// attributes
$this->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

View file

@ -1,17 +1,17 @@
<?php
namespace Propel\PropelBundle\Tests\Fixtures\Model\om;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model\om;
use \BaseObject;
use \BasePeer;
use \Criteria;
use \PDO;
use \Persistent;
use \Propel;
use \PropelException;
use \PropelPDO;
use Propel\PropelBundle\Tests\Fixtures\Model\BookPeer;
use Propel\PropelBundle\Tests\Fixtures\Model\BookQuery;
use BaseObject;
use BasePeer;
use Criteria;
use PDO;
use Persistent;
use Propel;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookPeer;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookQuery;
use PropelException;
use PropelPDO;
/**
* Base class that represents a row from the 'book' table.
@ -25,7 +25,7 @@ abstract class BaseBook extends BaseObject implements Persistent
/**
* Peer class name
*/
const PEER = 'Propel\\PropelBundle\\Tests\\Fixtures\\Model\\BookPeer';
const PEER = 'Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\Model\\BookPeer';
/**
* The Peer class.

View file

@ -1,6 +1,6 @@
<?php
namespace Propel\PropelBundle\Tests\Fixtures\Model\om;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model\om;
use \BasePeer;
use \Criteria;
@ -9,9 +9,9 @@ use \PDOStatement;
use \Propel;
use \PropelException;
use \PropelPDO;
use Propel\PropelBundle\Tests\Fixtures\Model\Book;
use Propel\PropelBundle\Tests\Fixtures\Model\BookPeer;
use Propel\PropelBundle\Tests\Fixtures\Model\map\BookTableMap;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookPeer;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\map\BookTableMap;
/**
* Base static class for performing query and update operations on the 'book' table.
@ -28,7 +28,7 @@ abstract class BaseBookPeer
const TABLE_NAME = 'book';
/** the related Propel class for this table */
const OM_CLASS = 'Propel\\PropelBundle\\Tests\\Fixtures\\Model\\Book';
const OM_CLASS = 'Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\Model\\Book';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'vendor/bundles/Propel/PropelBundle/Tests/Fixtures/Model.Book';

View file

@ -1,12 +1,12 @@
<?php
namespace Propel\PropelBundle\Tests\Fixtures\Model\om;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model\om;
use \Criteria;
use \ModelCriteria;
use \PropelPDO;
use Propel\PropelBundle\Tests\Fixtures\Model\BookPeer;
use Propel\PropelBundle\Tests\Fixtures\Model\BookQuery;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookPeer;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookQuery;
/**
* Base class that represents a query for the 'book' table.
@ -47,7 +47,7 @@ abstract class BaseBookQuery extends ModelCriteria
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'mydb', $modelName = 'Propel\\PropelBundle\\Tests\\Fixtures\\Model\\Book', $modelAlias = null)
public function __construct($dbName = 'mydb', $modelName = 'Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\Model\\Book', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Tests\Fixtures;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
class ReadOnlyItem extends \BaseObject
{

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Tests\Fixtures;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
class ReadOnlyItemQuery
{

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Tests\Fixtures;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
class TranslatableItem implements \Persistent
{

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Propel\PropelBundle\Tests\Fixtures;
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
class TranslatableItemI18n implements \Persistent
{

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<database name="translation" defaultIdMethod="native" namespace="Propel\PropelBundle\Tests\Fixtures\Model">
<database name="translation" defaultIdMethod="native" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\Model">
<table name="translation">
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
<column name="key" type="varchar" size="255" required="true" primaryString="true" />

View file

@ -1,18 +1,18 @@
<?php
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\Bundle\PropelBundle\Form\ChoiceList\ModelChoiceList;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Item;
use Propel\Bundle\PropelBundle\Tests\Fixtures\ItemQuery;
use Symfony\Component\Form\Tests\Extension\Core\ChoiceList\AbstractChoiceListTest;
class CompatModelChoiceListTest extends AbstractChoiceListTest
{
const ITEM_CLASS = '\Propel\PropelBundle\Tests\Fixtures\Item';
const ITEM_CLASS = '\Propel\Bundle\PropelBundle\Tests\Fixtures\Item';
/**
* @var \PHPUnit_Framework_MockObject_MockObject|\Propel\PropelBundle\Tests\Fixtures\ItemQuery
* @var \PHPUnit_Framework_MockObject_MockObject|\Propel\Bundle\PropelBundle\Tests\Fixtures\ItemQuery
*/
protected $query;
@ -40,7 +40,7 @@ class CompatModelChoiceListTest extends AbstractChoiceListTest
protected function setUp()
{
$this->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);

View file

@ -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,

View file

@ -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
{

View file

@ -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;

View file

@ -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()
{

View file

@ -1,18 +1,16 @@
<?php
namespace Propel\PropelBundle\Tests\Request\ParamConverter;
use Symfony\Component\HttpFoundation\Request;
namespace Propel\Bundle\PropelBundle\Tests\Request\ParamConverter;
use Propel\PropelBundle\Request\ParamConverter\PropelParamConverter;
use Propel\Bundle\PropelBundle\Request\ParamConverter\PropelParamConverter;
use Propel\Bundle\PropelBundle\Tests\TestCase;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Propel\PropelBundle\Tests\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
class PropelParamConverterTest extends TestCase
{
protected $con;
public function setUp()
@ -37,13 +35,13 @@ class PropelParamConverterTest extends TestCase
{
$paramConverter = new PropelParamConverter();
$configuration = new ParamConverter(array('class' => '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 = <<<XML
<database name="default" package="vendor.bundles.Propel.PropelBundle.Tests.Request.DataFixtures.Loader"
namespace="Propel\PropelBundle\Tests\Request\ParamConverter" defaultIdMethod="native">
namespace="Propel\Bundle\PropelBundle\Tests\Request\ParamConverter" defaultIdMethod="native">
<table name="my_book">
<column name="id" type="integer" primaryKey="true" />
<column name="name" type="varchar" size="255" />
@ -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());
}

View file

@ -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 <william.durand1@gmail.com>
@ -23,7 +23,7 @@ class PropelUserProviderTest extends TestCase
$this->loadPropelQuickBuilder();
$schema = <<<SCHEMA
<database name="users" defaultIdMethod="native" namespace="Propel\\PropelBundle\\Tests\\Fixtures\\Model">
<database name="users" defaultIdMethod="native" namespace="Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\Model">
<table name="user">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" />
<column name="username" type="varchar" size="255" primaryString="true" />
@ -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');

View file

@ -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;

View file

@ -1,22 +1,20 @@
<?php
namespace Propel\PropelBundle\Tests\Translation;
use Propel\PropelBundle\Tests\TestCase;
use Propel\PropelBundle\Tests\Fixtures\Model\Translation as Entry;
use Propel\PropelBundle\Translation\ModelTranslation;
namespace Propel\Bundle\PropelBundle\Tests\Translation;
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Translation as Entry;
use Propel\Bundle\PropelBundle\Tests\TestCase;
use Propel\Bundle\PropelBundle\Translation\ModelTranslation;
use Symfony\Component\Translation\MessageCatalogue;
/**
* @author Toni Uebernickel <tuebernickel@gmail.com>
*
* @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());
}

View file

@ -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 <william.durand1@gmail.com>

View file

@ -1,6 +1,6 @@
<?php
namespace Propel\PropelBundle\Translation;
namespace Propel\Bundle\PropelBundle\Translation;
use Symfony\Component\Config\Resource\ResourceInterface;
use Symfony\Component\Translation\Dumper\DumperInterface;

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\Twig\Extension;
namespace Propel\Bundle\PropelBundle\Twig\Extension;
/**
* SyntaxExtension class

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\Util;
namespace Propel\Bundle\PropelBundle\Util;
/**
* The Propel inflector class provides methods for inflecting text.

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\Validator\Constraints;
namespace Propel\Bundle\PropelBundle\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;

View file

@ -7,8 +7,7 @@
*
* @license MIT License
*/
namespace Propel\PropelBundle\Validator\Constraints;
namespace Propel\Bundle\PropelBundle\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;

View file

@ -10,7 +10,7 @@
}],
"autoload": {
"psr-4": { "Propel\\PropelBundle\\": "" },
"psr-4": { "Propel\\Bundle\\PropelBundle\\": "" },
"exclude-from-classmap": [ "Tests/" ]
},