introduce "Bundle" namespace part
This commit is contained in:
parent
4aa5244f67
commit
893c85c655
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Propel\Runtime\Connection\ConnectionManagerSingle;
|
||||
use Propel\Runtime\Propel;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Propel\Runtime\Propel;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Propel\Generator\Config\GeneratorConfig;
|
||||
use Propel\Generator\Command\ModelBuildCommand as BaseModelBuildCommand;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Propel\Runtime\Adapter\Pdo\MysqlAdapter;
|
||||
use Propel\Runtime\Propel;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Command;
|
||||
namespace Propel\Bundle\PropelBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Controller;
|
||||
namespace Propel\Bundle\PropelBundle\Controller;
|
||||
|
||||
use Propel\Runtime\Propel;
|
||||
use Symfony\Component\DependencyInjection\ContainerAware;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DataFixtures;
|
||||
namespace Propel\Bundle\PropelBundle\DataFixtures;
|
||||
|
||||
use Propel\Runtime\Map\DatabaseMap;
|
||||
use Propel\Runtime\Propel;
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DataFixtures\Dumper;
|
||||
namespace Propel\Bundle\PropelBundle\DataFixtures\Dumper;
|
||||
|
||||
use \PDO;
|
||||
use Propel\PropelBundle\DataFixtures\AbstractDataHandler;
|
||||
use Propel\Bundle\PropelBundle\DataFixtures\AbstractDataHandler;
|
||||
use Propel\Generator\Model\PropelTypes;
|
||||
use Propel\Runtime\Propel;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DataFixtures\Dumper;
|
||||
namespace Propel\Bundle\PropelBundle\DataFixtures\Dumper;
|
||||
|
||||
/**
|
||||
* Interface that exposes how Propel data dumpers should work.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DataFixtures\Dumper;
|
||||
namespace Propel\Bundle\PropelBundle\DataFixtures\Dumper;
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DataFixtures\Loader;
|
||||
namespace Propel\Bundle\PropelBundle\DataFixtures\Loader;
|
||||
|
||||
use Propel\PropelBundle\DataFixtures\AbstractDataHandler;
|
||||
use Propel\PropelBundle\Util\PropelInflector;
|
||||
use Propel\Bundle\PropelBundle\DataFixtures\AbstractDataHandler;
|
||||
use Propel\Bundle\PropelBundle\Util\PropelInflector;
|
||||
use Propel\Generator\Model\PropelTypes;
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
use Propel\Runtime\Map\Exception\TableNotFoundException;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DataFixtures\Loader;
|
||||
namespace Propel\Bundle\PropelBundle\DataFixtures\Loader;
|
||||
|
||||
/**
|
||||
* Interface that exposes how Propel data loaders should work.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DataFixtures\Loader;
|
||||
namespace Propel\Bundle\PropelBundle\DataFixtures\Loader;
|
||||
|
||||
/**
|
||||
* XML fixtures loader.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DataFixtures\Loader;
|
||||
namespace Propel\Bundle\PropelBundle\DataFixtures\Loader;
|
||||
|
||||
use Faker\Generator;
|
||||
use Symfony\Component\Yaml\ParseException;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DependencyInjection;
|
||||
namespace Propel\Bundle\PropelBundle\DependencyInjection;
|
||||
|
||||
use Propel\Common\Config\PropelConfiguration;
|
||||
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\DependencyInjection;
|
||||
namespace Propel\Bundle\PropelBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* For the full copyright and license information, please view the LICENSE
|
||||
* 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;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Form;
|
||||
namespace Propel\Bundle\PropelBundle\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace Propel\PropelBundle\Form\ChoiceList;
|
||||
namespace Propel\Bundle\PropelBundle\Form\ChoiceList;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Form\DataTransformer;
|
||||
namespace Propel\Bundle\PropelBundle\Form\DataTransformer;
|
||||
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
|
|
|
@ -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\Form\FormEvents;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Form\Type;
|
||||
namespace Propel\Bundle\PropelBundle\Form\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Propel\PropelBundle\Form\EventListener\TranslationCollectionFormListener;
|
||||
use Propel\Bundle\PropelBundle\Form\EventListener\TranslationCollectionFormListener;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Form\Type;
|
||||
namespace Propel\Bundle\PropelBundle\Form\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Propel\PropelBundle\Form\EventListener\TranslationFormListener;
|
||||
use Propel\Bundle\PropelBundle\Form\EventListener\TranslationFormListener;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Form;
|
||||
namespace Propel\Bundle\PropelBundle\Form;
|
||||
|
||||
use Propel\Runtime\Map\RelationMap;
|
||||
use Propel\Generator\Model\PropelTypes;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Logger;
|
||||
namespace Propel\Bundle\PropelBundle\Logger;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\LoggerTrait;
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\AclClass as BaseAclClass;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\AclClass as BaseAclClass;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface;
|
||||
|
@ -25,7 +25,7 @@ class AclClass extends BaseAclClass
|
|||
* @param \Symfony\Component\Security\Acl\Model\ObjectIdentityInterface $objectIdentity
|
||||
* @param ConnectionInterface $con
|
||||
*
|
||||
* @return \Propel\PropelBundle\Model\Acl\AclClass
|
||||
* @return \Propel\Bundle\PropelBundle\Model\Acl\AclClass
|
||||
*/
|
||||
public static function fromAclObjectIdentity(ObjectIdentityInterface $objectIdentity, ConnectionInterface $con = null)
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\AclClassQuery as BaseAclClassQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\AclClassQuery as BaseAclClassQuery;
|
||||
|
||||
class AclClassQuery extends BaseAclClassQuery
|
||||
{
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\Entry as BaseEntry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\Entry as BaseEntry;
|
||||
|
||||
use Propel\PropelBundle\Security\Acl\Domain\Entry as AclEntry;
|
||||
use Propel\PropelBundle\Security\Acl\Domain\FieldEntry as AclFieldEntry;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\Domain\Entry as AclEntry;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\Domain\FieldEntry as AclFieldEntry;
|
||||
|
||||
use Symfony\Component\Security\Acl\Model\AclInterface;
|
||||
use Symfony\Component\Security\Acl\Model\EntryInterface;
|
||||
|
@ -29,7 +29,7 @@ class Entry extends BaseEntry
|
|||
*
|
||||
* @param \Symfony\Component\Security\Acl\Model\EntryInterface $aclEntry
|
||||
*
|
||||
* @return \Propel\PropelBundle\Model\Acl\Entry
|
||||
* @return \Propel\Bundle\PropelBundle\Model\Acl\Entry
|
||||
*/
|
||||
public static function fromAclEntry(EntryInterface $aclEntry)
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ class Entry extends BaseEntry
|
|||
/**
|
||||
* Transform a given model entry into an ACL related Entry (ACE).
|
||||
*
|
||||
* @param \Propel\PropelBundle\Model\Acl\Entry $modelEntry
|
||||
* @param \Propel\Bundle\PropelBundle\Model\Acl\Entry $modelEntry
|
||||
* @param \Symfony\Component\Security\Acl\Model\AclInterface $acl
|
||||
*
|
||||
* @return \Symfony\Component\Security\Acl\Model\EntryInterface
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\EntryQuery as BaseEntryQuery;
|
||||
use Propel\PropelBundle\Model\Acl\Map\EntryTableMap;
|
||||
use Propel\PropelBundle\Model\Acl\Map\ObjectIdentityTableMap;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\EntryQuery as BaseEntryQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Map\EntryTableMap;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Map\ObjectIdentityTableMap;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\ObjectIdentity as BaseObjectIdentity;
|
||||
use Propel\PropelBundle\Model\Acl\Map\ObjectIdentityTableMap;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\ObjectIdentity as BaseObjectIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Map\ObjectIdentityTableMap;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
@ -67,7 +67,7 @@ class ObjectIdentity extends BaseObjectIdentity
|
|||
*
|
||||
* @param ConnectionInterface $con
|
||||
*
|
||||
* @return \Propel\PropelBundle\Model\Acl\ObjectIdentity $this
|
||||
* @return \Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity $this
|
||||
*/
|
||||
protected function updateAncestorsTree(ConnectionInterface $con = null)
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\ObjectIdentityAncestor as BaseObjectIdentityAncestor;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\ObjectIdentityAncestor as BaseObjectIdentityAncestor;
|
||||
|
||||
class ObjectIdentityAncestor extends BaseObjectIdentityAncestor
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\ObjectIdentityAncestorQuery as BaseObjectIdentityAncestorQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\ObjectIdentityAncestorQuery as BaseObjectIdentityAncestorQuery;
|
||||
|
||||
class ObjectIdentityAncestorQuery extends BaseObjectIdentityAncestorQuery
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\ObjectIdentityQuery as BaseObjectIdentityQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\ObjectIdentityQuery as BaseObjectIdentityQuery;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
@ -25,7 +25,7 @@ class ObjectIdentityQuery extends BaseObjectIdentityQuery
|
|||
* @param \Symfony\Component\Security\Acl\Model\ObjectIdentityInterface $objectIdentity
|
||||
* @param ConnectionInterface $con
|
||||
*
|
||||
* @return \Propel\PropelBundle\Model\Acl\ObjectIdentityQuery $this
|
||||
* @return \Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentityQuery $this
|
||||
*/
|
||||
public function filterByAclObjectIdentity(ObjectIdentityInterface $objectIdentity, ConnectionInterface $con = null)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ class ObjectIdentityQuery extends BaseObjectIdentityQuery
|
|||
* @param \Symfony\Component\Security\Acl\Model\ObjectIdentityInterface $objectIdentity
|
||||
* @param ConnectionInterface $con
|
||||
*
|
||||
* @return \Propel\PropelBundle\Model\Acl\ObjectIdentity
|
||||
* @return \Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity
|
||||
*/
|
||||
public function findOneByAclObjectIdentity(ObjectIdentityInterface $objectIdentity, ConnectionInterface $con = null)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ class ObjectIdentityQuery extends BaseObjectIdentityQuery
|
|||
/**
|
||||
* Return all children of the given object identity.
|
||||
*
|
||||
* @param \Propel\PropelBundle\Model\Acl\ObjectIdentity $objectIdentity
|
||||
* @param \Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity $objectIdentity
|
||||
* @param ConnectionInterface $con
|
||||
*
|
||||
* @return \PropelObjectCollection
|
||||
|
@ -77,7 +77,7 @@ class ObjectIdentityQuery extends BaseObjectIdentityQuery
|
|||
/**
|
||||
* Return all children and grand-children of the given object identity.
|
||||
*
|
||||
* @param \Propel\PropelBundle\Model\Acl\ObjectIdentity $objectIdentity
|
||||
* @param \Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity $objectIdentity
|
||||
* @param ConnectionInterface $con
|
||||
*
|
||||
* @return \PropelObjectCollection
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\SecurityIdentity as BaseSecurityIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\SecurityIdentity as BaseSecurityIdentity;
|
||||
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
|
@ -23,7 +23,7 @@ class SecurityIdentity extends BaseSecurityIdentity
|
|||
/**
|
||||
* Transform a given mode security identity into an ACL related SecurityIdentity.
|
||||
*
|
||||
* @param \Propel\PropelBundle\Model\Acl\SecurityIdentity $securityIdentity
|
||||
* @param \Propel\Bundle\PropelBundle\Model\Acl\SecurityIdentity $securityIdentity
|
||||
*
|
||||
* @return \Symfony\Component\Security\Acl\Model\SecurityIdentityInterface
|
||||
*/
|
||||
|
@ -58,7 +58,7 @@ class SecurityIdentity extends BaseSecurityIdentity
|
|||
* @param \Symfony\Component\Security\Acl\Model\SecurityIdentityInterface $aclIdentity
|
||||
* @param ConnectionInterface $con
|
||||
*
|
||||
* @return \Propel\PropelBundle\Model\Acl\SecurityIdentity
|
||||
* @return \Propel\Bundle\PropelBundle\Model\Acl\SecurityIdentity
|
||||
*/
|
||||
public static function fromAclIdentity(SecurityIdentityInterface $aclIdentity, ConnectionInterface $con = null)
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Base\SecurityIdentityQuery as BaseSecurityIdentityQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Base\SecurityIdentityQuery as BaseSecurityIdentityQuery;
|
||||
|
||||
class SecurityIdentityQuery extends BaseSecurityIdentityQuery
|
||||
{
|
||||
|
|
|
@ -8,9 +8,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 Propel\Runtime\Propel;
|
||||
use Propel\Runtime\Connection\ConnectionManagerSingle;
|
||||
use Propel\Runtime\Connection\ConnectionManagerMasterSlave;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Propel\PropelBundle\Request\ParamConverter;
|
||||
namespace Propel\Bundle\PropelBundle\Request\ParamConverter;
|
||||
|
||||
use Propel\PropelBundle\Util\PropelInflector;
|
||||
use Propel\Bundle\PropelBundle\Util\PropelInflector;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database name="default" namespace="Propel\PropelBundle\Model\Acl" defaultIdMethod="native" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd">
|
||||
<database name="default" namespace="Propel\Bundle\PropelBundle\Model\Acl" defaultIdMethod="native" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd">
|
||||
<table name="acl_classes" phpName="AclClass">
|
||||
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
|
||||
<column name="class_type" type="varchar" size="200" required="true" phpName="Type" />
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
<parameters>
|
||||
<parameter key="propel.dbal.default_connection">default</parameter>
|
||||
|
||||
<parameter key="propel.schema_locator.class">Propel\PropelBundle\Service\SchemaLocator</parameter>
|
||||
<parameter key="propel.data_collector.class">Propel\PropelBundle\DataCollector\PropelDataCollector</parameter>
|
||||
<parameter key="propel.logger.class">Propel\PropelBundle\Logger\PropelLogger</parameter>
|
||||
<parameter key="propel.twig.extension.syntax.class">Propel\PropelBundle\Twig\Extension\SyntaxExtension</parameter>
|
||||
<parameter key="form.type_guesser.propel.class">Propel\PropelBundle\Form\TypeGuesser</parameter>
|
||||
<parameter key="propel.form.type.model.class">Propel\PropelBundle\Form\Type\ModelType</parameter>
|
||||
<parameter key="propel.dumper.yaml.class">Propel\PropelBundle\DataFixtures\Dumper\YamlDataDumper</parameter>
|
||||
<parameter key="propel.loader.yaml.class">Propel\PropelBundle\DataFixtures\Loader\YamlDataLoader</parameter>
|
||||
<parameter key="propel.loader.xml.class">Propel\PropelBundle\DataFixtures\Loader\XmlDataLoader</parameter>
|
||||
<parameter key="propel.schema_locator.class">Propel\Bundle\PropelBundle\Service\SchemaLocator</parameter>
|
||||
<parameter key="propel.data_collector.class">Propel\Bundle\PropelBundle\DataCollector\PropelDataCollector</parameter>
|
||||
<parameter key="propel.logger.class">Propel\Bundle\PropelBundle\Logger\PropelLogger</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\TypeGuesser</parameter>
|
||||
<parameter key="propel.form.type.model.class">Propel\Bundle\PropelBundle\Form\Type\ModelType</parameter>
|
||||
<parameter key="propel.dumper.yaml.class">Propel\Bundle\PropelBundle\DataFixtures\Dumper\YamlDataDumper</parameter>
|
||||
<parameter key="propel.loader.yaml.class">Propel\Bundle\PropelBundle\DataFixtures\Loader\YamlDataLoader</parameter>
|
||||
<parameter key="propel.loader.xml.class">Propel\Bundle\PropelBundle\DataFixtures\Loader\XmlDataLoader</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<parameters>
|
||||
<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.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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<div class="{{
|
||||
(': Symfony\\Component' in trace
|
||||
or ': Propel\\Runtime' in trace
|
||||
or ': Propel\\PropelBundle' in trace
|
||||
or ': Propel\\Bundle\\PropelBundle' in trace
|
||||
or ': call_user_func(Object(Symfony\\Component' in trace
|
||||
or ': call_user_func(Array, Object(Symfony\\Component' in trace
|
||||
) ? 'gray' : 'regular' }}">{{ trace }}</div>
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Security\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Security\Acl;
|
||||
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\EntryQuery;
|
||||
use Propel\PropelBundle\Model\Acl\ObjectIdentityQuery;
|
||||
use Propel\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\EntryQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentityQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
|
||||
use Propel\PropelBundle\Security\Acl\Domain\Acl;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\Domain\Acl;
|
||||
|
||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
||||
|
||||
|
@ -172,7 +172,7 @@ class AclProvider implements AclProviderInterface
|
|||
* @param \Symfony\Component\Security\Acl\Model\AclInterface $parentAcl
|
||||
* @param bool $inherited
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\Acl
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\Acl
|
||||
*/
|
||||
protected function getAcl(ObjectCollection $collection, ObjectIdentityInterface $objectIdentity, array $loadedSecurityIdentities = array(), AclInterface $parentAcl = null, $inherited = true)
|
||||
{
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Security\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Security\Acl;
|
||||
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\PropelBundle\Security\Acl\Domain\AuditableAcl;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\Domain\AuditableAcl;
|
||||
|
||||
use Symfony\Component\Security\Acl\Model\AclInterface;
|
||||
use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface;
|
||||
|
@ -30,7 +30,7 @@ class AuditableAclProvider extends MutableAclProvider
|
|||
* @param \Symfony\Component\Security\Acl\Model\AclInterface $parentAcl
|
||||
* @param bool $inherited
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\AuditableAcl
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\AuditableAcl
|
||||
*/
|
||||
protected function getAcl(ObjectCollection $collection, ObjectIdentityInterface $objectIdentity, array $loadedSecurityIdentities = array(), AclInterface $parentAcl = null, $inherited = true)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Security\Acl\Domain;
|
||||
namespace Propel\Bundle\PropelBundle\Security\Acl\Domain;
|
||||
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
|
||||
|
@ -20,13 +20,13 @@ use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface;
|
|||
use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
|
||||
|
||||
/**
|
||||
* An ACL implementation that is immutable based on data from a ObjectCollection of Propel\PropelBundle\Model\Acl\Entry.
|
||||
* An ACL implementation that is immutable based on data from a ObjectCollection of Propel\Bundle\PropelBundle\Model\Acl\Entry.
|
||||
*
|
||||
* @author Toni Uebernickel <tuebernickel@gmail.com>
|
||||
*/
|
||||
class Acl implements AclInterface
|
||||
{
|
||||
protected $model = '\Propel\PropelBundle\Model\Acl\Entry';
|
||||
protected $model = '\Propel\Bundle\PropelBundle\Model\Acl\Entry';
|
||||
|
||||
protected $classAces = array();
|
||||
protected $classFieldAces = array();
|
||||
|
@ -303,7 +303,7 @@ class Acl implements AclInterface
|
|||
*
|
||||
* @param string $field
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\Acl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\Acl $this
|
||||
*/
|
||||
protected function updateFields($field)
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Security\Acl\Domain;
|
||||
namespace Propel\Bundle\PropelBundle\Security\Acl\Domain;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
|
||||
use Symfony\Component\Security\Acl\Model\AuditableAclInterface;
|
||||
|
||||
|
@ -81,7 +81,7 @@ class AuditableAcl extends MutableAcl implements AuditableAclInterface
|
|||
* @param bool $auditSuccess
|
||||
* @param bool $auditFailure
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\AuditableAcl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\AuditableAcl $this
|
||||
*/
|
||||
protected function updateAuditing(array &$list, $index, $auditSuccess, $auditFailure)
|
||||
{
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Security\Acl\Domain;
|
||||
namespace Propel\Bundle\PropelBundle\Security\Acl\Domain;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
|
||||
use Symfony\Component\Security\Acl\Model\AclInterface;
|
||||
use Symfony\Component\Security\Acl\Model\AuditableEntryInterface;
|
||||
use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
|
||||
|
||||
/**
|
||||
* An ACE implementation retrieving data from a given Propel\PropelBundle\Model\Acl\Entry.
|
||||
* An ACE implementation retrieving data from a given Propel\Bundle\PropelBundle\Model\Acl\Entry.
|
||||
*
|
||||
* The entry is only used to grab a "snapshot" of its data as an EntryInterface is immutable!
|
||||
*
|
||||
|
@ -41,7 +41,7 @@ class Entry implements AuditableEntryInterface
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \Propel\PropelBundle\Model\Acl\Entry $entry
|
||||
* @param \Propel\Bundle\PropelBundle\Model\Acl\Entry $entry
|
||||
* @param \Symfony\Component\Security\Acl\Model\AclInterface $acl
|
||||
*/
|
||||
public function __construct(ModelEntry $entry, AclInterface $acl)
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Security\Acl\Domain;
|
||||
namespace Propel\Bundle\PropelBundle\Security\Acl\Domain;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
|
||||
use Symfony\Component\Security\Acl\Model\AclInterface;
|
||||
use Symfony\Component\Security\Acl\Model\FieldEntryInterface;
|
||||
|
||||
/**
|
||||
* An ACE implementation retrieving data from a given \Propel\PropelBundle\Model\Acl\Entry.
|
||||
* An ACE implementation retrieving data from a given \Propel\Bundle\PropelBundle\Model\Acl\Entry.
|
||||
*
|
||||
* The entry is only used to grab a "snapshot" of its data as an \Symfony\Component\Security\Acl\Model\EntryInterface is immutable!
|
||||
*
|
||||
|
@ -31,7 +31,7 @@ class FieldEntry extends Entry implements FieldEntryInterface
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \Propel\PropelBundle\Model\Acl\Entry $entry
|
||||
* @param \Propel\Bundle\PropelBundle\Model\Acl\Entry $entry
|
||||
* @param \Symfony\Component\Security\Acl\Model\AclInterface $acl
|
||||
*/
|
||||
public function __construct(ModelEntry $entry, AclInterface $acl)
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Security\Acl\Domain;
|
||||
namespace Propel\Bundle\PropelBundle\Security\Acl\Domain;
|
||||
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
use Propel\PropelBundle\Model\Acl\ObjectIdentity;
|
||||
use Propel\PropelBundle\Model\Acl\ObjectIdentityQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentityQuery;
|
||||
|
||||
use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy;
|
||||
|
||||
|
@ -43,7 +43,7 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
/**
|
||||
* A reference to the ObjectIdentity this ACL is mapped to.
|
||||
*
|
||||
* @var \Propel\PropelBundle\Model\Acl\ObjectIdentity
|
||||
* @var \Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity
|
||||
*/
|
||||
protected $modelObjectIdentity;
|
||||
|
||||
|
@ -340,9 +340,9 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
*
|
||||
* @param array $list
|
||||
* @param int $index
|
||||
* @param \Propel\PropelBundle\Model\Acl\Entry\Entry $entry
|
||||
* @param \Propel\Bundle\PropelBundle\Model\Acl\Entry\Entry $entry
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
*/
|
||||
protected function insertToList(array &$list, $index, Entry $entry)
|
||||
{
|
||||
|
@ -370,7 +370,7 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
* @param string $strategy
|
||||
* @param string $field
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
*/
|
||||
protected function updateAce(array &$list, $index, $mask, $strategy = null)
|
||||
{
|
||||
|
@ -397,7 +397,7 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
* @param array $list
|
||||
* @param $index
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
*/
|
||||
protected function deleteIndex(array &$list, $index)
|
||||
{
|
||||
|
@ -416,7 +416,7 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
* @param array $list
|
||||
* @param int $index
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
*/
|
||||
protected function isWithinBounds(array &$list, $index)
|
||||
{
|
||||
|
@ -436,7 +436,7 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
* @param array $list
|
||||
* @param $index
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
*/
|
||||
protected function validateIndex(array &$list, $index)
|
||||
{
|
||||
|
@ -455,7 +455,7 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
* @param array $list
|
||||
* @param string $field
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
*/
|
||||
protected function validateField(array &$list, $field)
|
||||
{
|
||||
|
@ -472,7 +472,7 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
* @param array $list
|
||||
* @param int $index The right boundary to which the list is valid.
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl $this
|
||||
*/
|
||||
protected function reorderList(array &$list, $index)
|
||||
{
|
||||
|
@ -494,7 +494,7 @@ class MutableAcl extends Acl implements MutableAclInterface
|
|||
* @param bool $granting
|
||||
* @param string $field
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\Entry|\Propel\PropelBundle\Security\Acl\Domain\FieldEntry
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\Entry|\Propel\Bundle\PropelBundle\Security\Acl\Domain\FieldEntry
|
||||
*/
|
||||
protected function createAce($mask, $index, SecurityIdentityInterface $securityIdentity, $strategy = null, $granting = true, $field = null)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Security\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Security\Acl;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
|
@ -16,16 +16,16 @@ use Propel\Runtime\Connection\ConnectionInterface;
|
|||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ServiceContainer\ServiceContainerInterface;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\PropelBundle\Model\Acl\Map\EntryTableMap;
|
||||
use Propel\PropelBundle\Model\Acl\EntryQuery;
|
||||
use Propel\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
use Propel\PropelBundle\Model\Acl\ObjectIdentity;
|
||||
use Propel\PropelBundle\Model\Acl\ObjectIdentityQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Map\EntryTableMap;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\EntryQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentityQuery;
|
||||
|
||||
use Propel\PropelBundle\Security\Acl\Domain\Acl;
|
||||
use Propel\PropelBundle\Security\Acl\Domain\MutableAcl;
|
||||
use Propel\PropelBundle\Security\Acl\Domain\Entry;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\Domain\Acl;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\Domain\Entry;
|
||||
|
||||
use Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException;
|
||||
use Symfony\Component\Security\Acl\Exception\Exception as AclException;
|
||||
|
@ -72,7 +72,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
|
|||
*
|
||||
* @param \Symfony\Component\Security\Acl\Model\ObjectIdentityInterface $objectIdentity
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl
|
||||
*/
|
||||
public function createAcl(ObjectIdentityInterface $objectIdentity)
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
|
|||
public function updateAcl(MutableAclInterface $acl)
|
||||
{
|
||||
if (!$acl instanceof MutableAcl) {
|
||||
throw new \InvalidArgumentException('The given ACL is not tracked by this provider. Please provide \Propel\PropelBundle\Security\Acl\Domain\MutableAcl only.');
|
||||
throw new \InvalidArgumentException('The given ACL is not tracked by this provider. Please provide \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl only.');
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -230,7 +230,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
|
|||
* Persist the given ACEs.
|
||||
*
|
||||
* @param array $accessControlEntries
|
||||
* @param \Propel\PropelBundle\Model\Acl\ObjectIdentity $objectIdentity
|
||||
* @param \Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity $objectIdentity
|
||||
* @param bool $object
|
||||
*
|
||||
* @return array The IDs of the persisted ACEs.
|
||||
|
@ -286,7 +286,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
|
|||
*
|
||||
* @param \Symfony\Component\Security\Acl\Model\EntryInterface $ace
|
||||
*
|
||||
* @return \Propel\PropelBundle\Model\Acl\Entry|null
|
||||
* @return \Propel\Bundle\PropelBundle\Model\Acl\Entry|null
|
||||
*/
|
||||
protected function getPersistedAce(EntryInterface $ace, ObjectIdentity $objectIdentity, $object = false)
|
||||
{
|
||||
|
@ -331,7 +331,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
|
|||
* @param \Symfony\Component\Security\Acl\Model\AclInterface $parentAcl
|
||||
* @param bool $inherited
|
||||
*
|
||||
* @return \Propel\PropelBundle\Security\Acl\Domain\MutableAcl
|
||||
* @return \Propel\Bundle\PropelBundle\Security\Acl\Domain\MutableAcl
|
||||
*/
|
||||
protected function getAcl(ObjectCollection $collection, ObjectIdentityInterface $objectIdentity, array $loadedSecurityIdentities = array(), AclInterface $parentAcl = null, $inherited = true)
|
||||
{
|
||||
|
|
|
@ -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\User\UserInterface;
|
||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Service;
|
||||
namespace Propel\Bundle\PropelBundle\Service;
|
||||
|
||||
use Symfony\Component\Config\FileLocatorInterface;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests;
|
||||
namespace Propel\Bundle\PropelBundle\Tests;
|
||||
|
||||
use Propel\Generator\Util\QuickBuilder;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\AclClass;
|
||||
use Propel\PropelBundle\Model\Acl\Entry;
|
||||
use Propel\PropelBundle\Model\Acl\ObjectIdentity as ModelObjectIdentity;
|
||||
use Propel\PropelBundle\Security\Acl\MutableAclProvider;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\AclClass;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Entry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity as ModelObjectIdentity;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\MutableAclProvider;
|
||||
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
||||
|
@ -38,7 +38,7 @@ class AclTestCase extends TestCase
|
|||
|
||||
$schema = file_get_contents(__DIR__.'/../Resources/acl_schema.xml');
|
||||
|
||||
if (!class_exists('Propel\PropelBundle\Model\Acl\Map\AclClassTableMap')) {
|
||||
if (!class_exists('Propel\Bundle\PropelBundle\Model\Acl\Map\AclClassTableMap')) {
|
||||
$classTargets = array('tablemap', 'object', 'query');
|
||||
} else {
|
||||
$classTargets = array();
|
||||
|
@ -51,7 +51,7 @@ class AclTestCase extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \Propel\PropelBundle\Model\Acl\ObjectIdentity
|
||||
* @return \Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity
|
||||
*/
|
||||
protected function createModelObjectIdentity($identifier)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ class AclTestCase extends TestCase
|
|||
|
||||
protected function getAclObjectIdentity($identifier = 1)
|
||||
{
|
||||
return new ObjectIdentity($identifier, 'Propel\PropelBundle\Tests\Fixtures\Model\Book');
|
||||
return new ObjectIdentity($identifier, 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book');
|
||||
}
|
||||
|
||||
protected function getRoleSecurityIdentity($role = 'ROLE_USER')
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\DataFixtures\Dumper;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\DataFixtures\Dumper;
|
||||
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\PropelBundle\Tests\DataFixtures\TestCase;
|
||||
use Propel\PropelBundle\DataFixtures\Dumper\YamlDataDumper;
|
||||
use Propel\Bundle\PropelBundle\Tests\DataFixtures\TestCase;
|
||||
use Propel\Bundle\PropelBundle\DataFixtures\Dumper\YamlDataDumper;
|
||||
|
||||
/**
|
||||
* @author William Durand <william.durand1@gmail.com>
|
||||
|
@ -22,13 +22,13 @@ class YamlDataDumperTest extends TestCase
|
|||
{
|
||||
public function testYamlDump()
|
||||
{
|
||||
$author = new \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor();
|
||||
$author = new \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor();
|
||||
$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\CoolBook();
|
||||
$book = new \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook();
|
||||
$book
|
||||
->setName('An important one')
|
||||
->setAuthorId(1)
|
||||
|
@ -42,11 +42,11 @@ class YamlDataDumperTest extends TestCase
|
|||
$loader->dump($filename);
|
||||
|
||||
$expected = <<<YAML
|
||||
\Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
\Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
CoolBookAuthor_1:
|
||||
id: '1'
|
||||
name: 'A famous one'
|
||||
\Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook:
|
||||
\Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook:
|
||||
CoolBook_1:
|
||||
id: '1'
|
||||
name: 'An important one'
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\DataFixtures\Loader;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\DataFixtures\Loader;
|
||||
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\PropelBundle\Tests\DataFixtures\TestCase;
|
||||
use Propel\PropelBundle\DataFixtures\Loader\XmlDataLoader;
|
||||
use Propel\Bundle\PropelBundle\Tests\DataFixtures\TestCase;
|
||||
use Propel\Bundle\PropelBundle\DataFixtures\Loader\XmlDataLoader;
|
||||
|
||||
/**
|
||||
* @author William Durand <william.durand1@gmail.com>
|
||||
|
@ -24,10 +24,10 @@ class XmlDataLoaderTest extends TestCase
|
|||
{
|
||||
$fixtures = <<<XML
|
||||
<Fixtures>
|
||||
<CoolBookAuthor Namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader">
|
||||
<CoolBookAuthor Namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader">
|
||||
<CoolBookAuthor_1 id="1" name="A famous one" />
|
||||
</CoolBookAuthor>
|
||||
<CoolBook Namespace="Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader">
|
||||
<CoolBook Namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader">
|
||||
<CoolBook_1 id="1" name="An important one" author_id="CoolBookAuthor_1" />
|
||||
</CoolBook>
|
||||
</Fixtures>
|
||||
|
@ -38,10 +38,10 @@ XML;
|
|||
$loader = new XmlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$this->assertCount(1, $books);
|
||||
|
||||
$book = $books[0];
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor', $book->getCoolBookAuthor());
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor', $book->getCoolBookAuthor());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\DataFixtures\Loader;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\DataFixtures\Loader;
|
||||
|
||||
use Propel\Generator\Util\QuickBuilder;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\PropelBundle\Tests\DataFixtures\TestCase;
|
||||
use Propel\PropelBundle\DataFixtures\Loader\YamlDataLoader;
|
||||
use Propel\Bundle\PropelBundle\Tests\DataFixtures\TestCase;
|
||||
use Propel\Bundle\PropelBundle\DataFixtures\Loader\YamlDataLoader;
|
||||
|
||||
/**
|
||||
* @author William Durand <william.durand1@gmail.com>
|
||||
|
@ -24,11 +24,11 @@ class YamlDataLoaderTest extends TestCase
|
|||
public function testYamlLoadOneToMany()
|
||||
{
|
||||
$fixtures = <<<YAML
|
||||
\Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
\Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
CoolBookAuthor_1:
|
||||
id: '1'
|
||||
name: 'A famous one'
|
||||
\Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook:
|
||||
\Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook:
|
||||
CoolBook_1:
|
||||
id: '1'
|
||||
name: 'An important one'
|
||||
|
@ -40,11 +40,11 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$this->assertCount(1, $books);
|
||||
|
||||
$book = $books[0];
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor', $book->getCoolBookAuthor());
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor', $book->getCoolBookAuthor());
|
||||
}
|
||||
|
||||
public function testYamlLoadOneToManyExternalReference()
|
||||
|
@ -52,7 +52,7 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
|
||||
$fixtures = <<<YAML
|
||||
\Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
\Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
CoolBookAuthor_1:
|
||||
id: '1'
|
||||
name: 'A famous one'
|
||||
|
@ -62,7 +62,7 @@ YAML;
|
|||
$loader->load(array($filename), 'default');
|
||||
|
||||
$fixtures = <<<YAML
|
||||
\Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook:
|
||||
\Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook:
|
||||
CoolBook_1:
|
||||
id: '1'
|
||||
name: 'An important one'
|
||||
|
@ -72,17 +72,17 @@ YAML;
|
|||
$filename = $this->getTempFile($fixtures);
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$this->assertCount(1, $books);
|
||||
|
||||
$book = $books[0];
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor', $book->getCoolBookAuthor());
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor', $book->getCoolBookAuthor());
|
||||
}
|
||||
|
||||
public function testLoadSelfReferencing()
|
||||
{
|
||||
$fixtures = <<<YAML
|
||||
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
CoolBookAuthor_1:
|
||||
id: '1'
|
||||
name: 'to be announced'
|
||||
|
@ -96,10 +96,10 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$this->assertCount(0, $books);
|
||||
|
||||
$authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthorQuery::create()->find($this->con);
|
||||
$authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthorQuery::create()->find($this->con);
|
||||
$this->assertCount(1, $authors);
|
||||
|
||||
$author = $authors[0];
|
||||
|
@ -109,7 +109,7 @@ YAML;
|
|||
public function testLoaderWithPhp()
|
||||
{
|
||||
$fixtures = <<<YAML
|
||||
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
CoolBookAuthor_1:
|
||||
id: '1'
|
||||
name: <?php echo "to be announced"; ?>
|
||||
|
@ -120,10 +120,10 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$this->assertCount(0, $books);
|
||||
|
||||
$authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthorQuery::create()->find($this->con);
|
||||
$authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthorQuery::create()->find($this->con);
|
||||
$this->assertCount(1, $authors);
|
||||
|
||||
$author = $authors[0];
|
||||
|
@ -133,7 +133,7 @@ YAML;
|
|||
public function testLoadWithoutFaker()
|
||||
{
|
||||
$fixtures = <<<YAML
|
||||
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthor:
|
||||
CoolBookAuthor_1:
|
||||
id: '1'
|
||||
name: <?php echo \$faker('word'); ?>
|
||||
|
@ -144,10 +144,10 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$this->assertCount(0, $books);
|
||||
|
||||
$authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthorQuery::create()->find($this->con);
|
||||
$authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookAuthorQuery::create()->find($this->con);
|
||||
$this->assertCount(1, $authors);
|
||||
|
||||
$author = $authors[0];
|
||||
|
@ -161,7 +161,7 @@ YAML;
|
|||
}
|
||||
|
||||
$fixtures = <<<YAML
|
||||
Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook:
|
||||
Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook:
|
||||
CoolBook_1:
|
||||
id: '1'
|
||||
name: <?php \$faker('word'); ?>
|
||||
|
@ -173,7 +173,7 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array(), \Faker\Factory::create());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBookQuery::create()->find($this->con);
|
||||
$this->assertCount(1, $books);
|
||||
|
||||
$book = $books[0];
|
||||
|
@ -188,7 +188,7 @@ YAML;
|
|||
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.Bundle.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" />
|
||||
|
@ -214,7 +214,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'
|
||||
|
@ -222,7 +222,7 @@ XML;
|
|||
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'
|
||||
|
@ -231,7 +231,7 @@ XML;
|
|||
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
|
||||
|
@ -247,20 +247,20 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookQuery::create()->find($con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookQuery::create()->find($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\YamlManyToManyAuthorQuery::create()->find($con);;
|
||||
$authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyAuthorQuery::create()->find($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\YamlManyToManyBookAuthorQuery::create()->find($con);;
|
||||
$bookAuthors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyBookAuthorQuery::create()->find($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]));
|
||||
|
@ -270,7 +270,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.Bundle.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" />
|
||||
|
@ -296,29 +296,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'
|
||||
|
@ -335,20 +335,20 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename1, $filename2), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookQuery::create()->find($con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookQuery::create()->find($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\YamlManyToManyMultipleFilesAuthorQuery::create()->find($con);
|
||||
$authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesAuthorQuery::create()->find($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\YamlManyToManyMultipleFilesBookAuthorQuery::create()->find($con);
|
||||
$bookAuthors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlManyToManyMultipleFilesBookAuthorQuery::create()->find($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]));
|
||||
|
@ -358,7 +358,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.Bundle.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" />
|
||||
|
@ -385,11 +385,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
|
||||
|
@ -404,18 +404,18 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$books = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipBookQuery::create()->find($con);
|
||||
$books = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlInheritedRelationshipBookQuery::create()->find($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 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.Bundle.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" />
|
||||
|
@ -424,7 +424,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}}
|
||||
|
@ -439,16 +439,16 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$book = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlBookWithObjectQuery::create(null)->findOne($con);
|
||||
$book = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlBookWithObjectQuery::create(null)->findOne($con);
|
||||
|
||||
$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.Bundle.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" />
|
||||
|
@ -470,11 +470,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
|
||||
|
@ -489,11 +489,11 @@ YAML;
|
|||
$loader = new YamlDataLoader(__DIR__.'/../../Fixtures/DataFixtures/Loader', array());
|
||||
$loader->load(array($filename), 'default');
|
||||
|
||||
$authors = \Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyAuthorQuery::create()->find($con);
|
||||
$authors = \Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\YamlDelegateOnPrimaryKeyAuthorQuery::create()->find($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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\DataFixtures;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\DataFixtures;
|
||||
|
||||
use Propel\Generator\Util\QuickBuilder;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\PropelBundle\Tests\TestCase as BaseTestCase;
|
||||
use Propel\Bundle\PropelBundle\Tests\TestCase as BaseTestCase;
|
||||
|
||||
/**
|
||||
* @author Toni Uebernickel <tuebernickel@gmail.com>
|
||||
|
@ -35,9 +35,9 @@ class TestCase extends BaseTestCase
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
if (!class_exists('Propel\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook')) {
|
||||
if (!class_exists('Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader\CoolBook')) {
|
||||
$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.Bundle.PropelBundle.Tests.Fixtures.DataFixtures.Loader" namespace="Propel\Bundle\PropelBundle\Tests\Fixtures\DataFixtures\Loader" defaultIdMethod="native">
|
||||
<table name="cool_book">
|
||||
<column name="id" type="integer" primaryKey="true" />
|
||||
<column name="name" type="varchar" size="255" />
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Acl;
|
||||
|
||||
use Symfony\Component\Security\Acl\Model\AclInterface;
|
||||
use Symfony\Component\Security\Acl\Model\AclCacheInterface;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
|
||||
|
||||
use Propel\Generator\Model\PropelTypes;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
|
||||
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
|
||||
|
||||
use Propel\Runtime\Map\ColumnMap;
|
||||
use Propel\Runtime\Map\RelationMap;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures\Model\Base;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
use \PDO;
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\BookQuery as ChildBookQuery;
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\Map\BookTableMap;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookQuery as ChildBookQuery;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Map\BookTableMap;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
|
@ -22,7 +22,7 @@ abstract class Book implements ActiveRecordInterface
|
|||
/**
|
||||
* TableMap class name
|
||||
*/
|
||||
const TABLE_MAP = '\\Propel\\PropelBundle\\Tests\\Fixtures\\Model\\Map\\BookTableMap';
|
||||
const TABLE_MAP = '\\Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\Model\\Map\\BookTableMap';
|
||||
|
||||
/**
|
||||
* attribute to determine if this object has previously been saved.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures\Model\Base;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
use \PDO;
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\Book as ChildBook;
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\BookQuery as ChildBookQuery;
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\Map\BookTableMap;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book as ChildBook;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookQuery as ChildBookQuery;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Map\BookTableMap;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
|
@ -59,7 +59,7 @@ abstract class BookQuery 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 = 'default', $modelName = '\\Propel\\PropelBundle\\Tests\\Fixtures\\Model\\Book', $modelAlias = null)
|
||||
public function __construct($dbName = 'default', $modelName = '\\Propel\\Bundle\\PropelBundle\\Tests\\Fixtures\\Model\\Book', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
@ -74,10 +74,10 @@ abstract class BookQuery extends ModelCriteria
|
|||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Propel\PropelBundle\Tests\Fixtures\Model\BookQuery) {
|
||||
if ($criteria instanceof \Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Propel\PropelBundle\Tests\Fixtures\Model\BookQuery();
|
||||
$query = new \Propel\Bundle\PropelBundle\Tests\Fixtures\Model\BookQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures\Model;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model;
|
||||
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\Base\Book as BaseBook;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Base\Book as BaseBook;
|
||||
|
||||
class Book extends BaseBook
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures\Model;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model;
|
||||
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\Base\BookQuery as BaseBookQuery;
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\Book;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Base\BookQuery as BaseBookQuery;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book;
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'book' table.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures\Model\Map;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Map;
|
||||
|
||||
use Acme\DemoBundle\Model\Book;
|
||||
use Acme\DemoBundle\Model\BookQuery;
|
||||
|
@ -46,7 +46,7 @@ class BookTableMap extends TableMap
|
|||
/**
|
||||
* 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 tableMap
|
||||
|
@ -138,7 +138,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('src.Acme.DemoBundle.Model');
|
||||
$this->setUseIdGenerator(true);
|
||||
// columns
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures\Model;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures\Model;
|
||||
|
||||
use Propel\PropelBundle\Tests\Fixtures\Model\Base\User as BaseUser;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Base\User as BaseUser;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
class User extends BaseUser implements UserInterface
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
|
||||
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
|
||||
|
||||
use Propel\Runtime\Map\ColumnMap;
|
||||
use Propel\Runtime\Map\TableMap;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
|
||||
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Fixtures;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Fixtures;
|
||||
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
|
|
@ -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\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\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()
|
||||
{
|
||||
|
@ -48,7 +48,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,
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Form\Form\DataTransformer;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Form\Form\DataTransformer;
|
||||
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\PropelBundle\Tests\TestCase;
|
||||
use Propel\PropelBundle\Form\DataTransformer\CollectionToArrayTransformer;
|
||||
use Propel\Bundle\PropelBundle\Tests\TestCase;
|
||||
use Propel\Bundle\PropelBundle\Form\DataTransformer\CollectionToArrayTransformer;
|
||||
|
||||
class CollectionToArrayTransformerTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -9,19 +9,19 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Form\Form\Type;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Form\Form\Type;
|
||||
|
||||
use Propel\PropelBundle\Tests\Fixtures\Item;
|
||||
use Propel\PropelBundle\Form\PropelExtension;
|
||||
use Propel\PropelBundle\Tests\Fixtures\TranslatableItemI18n;
|
||||
use Propel\PropelBundle\Tests\Fixtures\TranslatableItem;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\Item;
|
||||
use Propel\Bundle\PropelBundle\Form\PropelExtension;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\TranslatableItemI18n;
|
||||
use Propel\Bundle\PropelBundle\Tests\Fixtures\TranslatableItem;
|
||||
use Symfony\Component\Form\Tests\Extension\Core\Type\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 setUp()
|
||||
{
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Form;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Form;
|
||||
|
||||
use Propel\PropelBundle\Form\TypeGuesser;
|
||||
use Propel\PropelBundle\Tests\TestCase;
|
||||
use Propel\Bundle\PropelBundle\Form\TypeGuesser;
|
||||
use Propel\Bundle\PropelBundle\Tests\TestCase;
|
||||
use Symfony\Component\Form\Guess\Guess;
|
||||
|
||||
class TypeGuesserTest extends TestCase
|
||||
{
|
||||
const CLASS_NAME = 'Propel\PropelBundle\Tests\Fixtures\Item';
|
||||
const CLASS_NAME = 'Propel\Bundle\PropelBundle\Tests\Fixtures\Item';
|
||||
|
||||
const UNKNOWN_CLASS_NAME = 'Propel\PropelBundle\Tests\Fixtures\UnknownItem';
|
||||
const UNKNOWN_CLASS_NAME = 'Propel\Bundle\PropelBundle\Tests\Fixtures\UnknownItem';
|
||||
|
||||
private $guesser;
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\AclClass;
|
||||
use Propel\PropelBundle\Model\Acl\AclClassQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\AclClass;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\AclClassQuery;
|
||||
|
||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
||||
|
||||
use Propel\PropelBundle\Tests\AclTestCase;
|
||||
use Propel\Bundle\PropelBundle\Tests\AclTestCase;
|
||||
|
||||
/**
|
||||
* @author Toni Uebernickel <tuebernickel@gmail.com>
|
||||
|
@ -27,11 +27,11 @@ class AclClassTest extends AclTestCase
|
|||
$type = 'Merchant';
|
||||
|
||||
$aclClass = AclClass::fromAclObjectIdentity(new ObjectIdentity(5, $type), $this->con);
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Model\Acl\AclClass', $aclClass);
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Model\Acl\AclClass', $aclClass);
|
||||
$this->assertEquals($type, $aclClass->getType());
|
||||
|
||||
$dbEntry = AclClassQuery::create()->findOne($this->con);
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Model\Acl\AclClass', $dbEntry);
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Model\Acl\AclClass', $dbEntry);
|
||||
$this->assertEquals($type, $dbEntry->getType());
|
||||
|
||||
$this->assertEquals($dbEntry->getId(), $aclClass->getId());
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Entry;
|
||||
use Propel\PropelBundle\Model\Acl\EntryQuery;
|
||||
use Propel\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Entry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\EntryQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
|
||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
||||
|
||||
use Propel\PropelBundle\Tests\AclTestCase;
|
||||
use Propel\Bundle\PropelBundle\Tests\AclTestCase;
|
||||
|
||||
/**
|
||||
* @author Toni Uebernickel <tuebernickel@gmail.com>
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\Entry as ModelEntry;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\SecurityIdentity;
|
||||
|
||||
use Propel\PropelBundle\Security\Acl\Domain\Entry as AclEntry;
|
||||
use Propel\Bundle\PropelBundle\Security\Acl\Domain\Entry as AclEntry;
|
||||
|
||||
use Propel\PropelBundle\Tests\AclTestCase;
|
||||
use Propel\Bundle\PropelBundle\Tests\AclTestCase;
|
||||
|
||||
/**
|
||||
* @author Toni Uebernickel <tuebernickel@gmail.com>
|
||||
|
@ -24,11 +24,11 @@ class EntryTest extends AclTestCase
|
|||
{
|
||||
public function testToAclEntry()
|
||||
{
|
||||
$acl = $this->getMock('Propel\PropelBundle\Security\Acl\Domain\AuditableAcl', array(), array(), '', false, false);
|
||||
$acl = $this->getMock('Propel\Bundle\PropelBundle\Security\Acl\Domain\AuditableAcl', array(), array(), '', false, false);
|
||||
$entry = $this->createModelEntry();
|
||||
|
||||
$aclEntry = ModelEntry::toAclEntry($entry, $acl);
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Security\Acl\Domain\Entry', $aclEntry);
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Security\Acl\Domain\Entry', $aclEntry);
|
||||
$this->assertSame($acl, $aclEntry->getAcl());
|
||||
$this->assertEquals(42, $aclEntry->getId());
|
||||
$this->assertTrue($aclEntry->isAuditFailure());
|
||||
|
@ -45,12 +45,12 @@ class EntryTest extends AclTestCase
|
|||
*/
|
||||
public function testToAclEntryFieldEntry()
|
||||
{
|
||||
$acl = $this->getMock('Propel\PropelBundle\Security\Acl\Domain\AuditableAcl', array(), array(), '', false, false);
|
||||
$acl = $this->getMock('Propel\Bundle\PropelBundle\Security\Acl\Domain\AuditableAcl', array(), array(), '', false, false);
|
||||
$entry = $this->createModelEntry();
|
||||
$entry->setFieldName('name');
|
||||
|
||||
$aclEntry = ModelEntry::toAclEntry($entry, $acl);
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Security\Acl\Domain\FieldEntry', $aclEntry);
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Security\Acl\Domain\FieldEntry', $aclEntry);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ class EntryTest extends AclTestCase
|
|||
{
|
||||
$modelEntry = ModelEntry::fromAclEntry($aclEntry);
|
||||
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Model\Acl\Entry', $modelEntry);
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Model\Acl\Entry', $modelEntry);
|
||||
$this->assertEquals(42, $modelEntry->getId());
|
||||
$this->assertTrue($modelEntry->getAuditFailure());
|
||||
$this->assertFalse($modelEntry->getAuditSuccess());
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Tests\Model\Acl;
|
||||
namespace Propel\Bundle\PropelBundle\Tests\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\AclClass;
|
||||
use Propel\PropelBundle\Model\Acl\ObjectIdentityQuery;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\AclClass;
|
||||
use Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentityQuery;
|
||||
|
||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
||||
|
||||
use Propel\PropelBundle\Tests\AclTestCase;
|
||||
use Propel\Bundle\PropelBundle\Tests\AclTestCase;
|
||||
|
||||
/**
|
||||
* @author Toni Uebernickel <tuebernickel@gmail.com>
|
||||
|
@ -24,10 +24,10 @@ class ObjectIdentityQueryTest extends AclTestCase
|
|||
{
|
||||
public function testFilterByAclObjectIdentity()
|
||||
{
|
||||
$aclObj = new ObjectIdentity(1, 'Propel\PropelBundle\Tests\Fixtures\Model\Book');
|
||||
$aclObj = new ObjectIdentity(1, 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book');
|
||||
|
||||
$aclClass = AclClass::fromAclObjectIdentity($aclObj, $this->con);
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Model\Acl\AclClass', $aclClass);
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Model\Acl\AclClass', $aclClass);
|
||||
|
||||
// None given.
|
||||
$result = ObjectIdentityQuery::create()->filterByAclObjectIdentity($aclObj, $this->con)->find($this->con);
|
||||
|
@ -42,7 +42,7 @@ class ObjectIdentityQueryTest extends AclTestCase
|
|||
$this->assertEquals(1, $result->getFirst()->getIdentifier());
|
||||
|
||||
// Change the entity.
|
||||
$aclObj = new ObjectIdentity(2, 'Propel\PropelBundle\Tests\Fixtures\Model\Book');
|
||||
$aclObj = new ObjectIdentity(2, 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book');
|
||||
$result = ObjectIdentityQuery::create()->filterByAclObjectIdentity($aclObj, $this->con)->find($this->con);
|
||||
$this->assertCount(0, $result);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class ObjectIdentityQueryTest extends AclTestCase
|
|||
*/
|
||||
public function testFindOneByAclObjectIdentity()
|
||||
{
|
||||
$aclObj = new ObjectIdentity(1, 'Propel\PropelBundle\Tests\Fixtures\Model\Book');
|
||||
$aclObj = new ObjectIdentity(1, 'Propel\Bundle\PropelBundle\Tests\Fixtures\Model\Book');
|
||||
|
||||
$result = ObjectIdentityQuery::create()->findOneByAclObjectIdentity($aclObj, $this->con);
|
||||
$this->assertEmpty($result);
|
||||
|
@ -60,7 +60,7 @@ class ObjectIdentityQueryTest extends AclTestCase
|
|||
$objIdentity = $this->createModelObjectIdentity(1);
|
||||
|
||||
$result = ObjectIdentityQuery::create()->findOneByAclObjectIdentity($aclObj, $this->con);
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Model\Acl\ObjectIdentity', $result);
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity', $result);
|
||||
$this->assertSame($objIdentity, $result);
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ class ObjectIdentityQueryTest extends AclTestCase
|
|||
|
||||
$result = ObjectIdentityQuery::create()->findChildren($objIdentity, $this->con);
|
||||
$this->assertCount(1, $result);
|
||||
$this->assertInstanceOf('Propel\PropelBundle\Model\Acl\ObjectIdentity', $result->getFirst());
|
||||
$this->assertInstanceOf('Propel\Bundle\PropelBundle\Model\Acl\ObjectIdentity', $result->getFirst());
|
||||
$this->assertSame($childObjIdentity, $result->getFirst());
|
||||
$this->assertSame($objIdentity, $result->getFirst()->getObjectIdentityRelatedByParentObjectIdentityId());
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue