-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "friendsofsymfony/user-bundle" to development dependencies
- Loading branch information
Showing
3 changed files
with
46 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,38 +2,21 @@ | |
|
||
namespace Hackzilla\Bundle\TicketBundle\Tests\Functional\Entity; | ||
|
||
use Hackzilla\Bundle\TicketBundle\Model\UserInterface; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use FOS\UserBundle\Model\User as BaseUser; | ||
|
||
/** | ||
* @ORM\Entity | ||
* @ORM\Table(name="fos_user") | ||
* | ||
* @author Javier Spagnoletti <[email protected]> | ||
*/ | ||
final class User implements UserInterface | ||
class User extends BaseUser | ||
{ | ||
public function getId() | ||
{ | ||
} | ||
|
||
public function getUsername() | ||
{ | ||
} | ||
|
||
public function getEmail() | ||
{ | ||
} | ||
|
||
public function getRoles() | ||
{ | ||
} | ||
|
||
public function getPassword() | ||
{ | ||
} | ||
|
||
public function getSalt() | ||
{ | ||
} | ||
|
||
public function eraseCredentials() | ||
{ | ||
} | ||
/** | ||
* @ORM\Id | ||
* @ORM\Column(type="integer") | ||
* @ORM\GeneratedValue(strategy="AUTO") | ||
*/ | ||
protected $id; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
namespace Hackzilla\Bundle\TicketBundle\Tests\Functional; | ||
|
||
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; | ||
use FOS\UserBundle\FOSUserBundle; | ||
use Hackzilla\Bundle\TicketBundle\HackzillaTicketBundle; | ||
use Hackzilla\Bundle\TicketBundle\Tests\Functional\Entity\User; | ||
use Knp\Bundle\PaginatorBundle\KnpPaginatorBundle; | ||
|
@@ -41,6 +42,7 @@ public function registerBundles() | |
new FrameworkBundle(), | ||
new SecurityBundle(), | ||
new DoctrineBundle(), | ||
new FOSUserBundle(), | ||
new KnpPaginatorBundle(), | ||
new TwigBundle(), | ||
new HackzillaTicketBundle(), | ||
|
@@ -96,6 +98,11 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load | |
$c->loadFromExtension('framework', [ | ||
'secret' => 'MySecretKey', | ||
'default_locale' => 'en', | ||
'session' => [ | ||
'handler_id' => 'session.handler.native_file', | ||
'storage_id' => 'session.storage.mock_file', | ||
'name' => 'MOCKSESSID', | ||
], | ||
'translator' => [ | ||
'fallbacks' => [ | ||
'en', | ||
|
@@ -131,20 +138,44 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load | |
], | ||
'orm' => [ | ||
'default_entity_manager' => 'default', | ||
'auto_mapping' => true, | ||
'mappings' => [ | ||
'HackzillaTicketBundle' => [ | ||
'dir' => __DIR__.'/Entity', | ||
'prefix' => 'Hackzilla\Bundle\TicketBundle\Tests\Functional\Entity', | ||
'alias' => 'HackzillaTicketBundle', | ||
'type' => 'annotation', | ||
], | ||
], | ||
], | ||
]); | ||
|
||
// TwigBundle config | ||
$twigConfig = [ | ||
'strict_variables' => '%kernel.debug%', | ||
'autoescape' => 'name', | ||
'strict_variables' => '%kernel.debug%', | ||
'exception_controller' => null, | ||
'autoescape' => 'name', | ||
]; | ||
// "default_path" configuration is available since version 3.4. | ||
if (version_compare(self::VERSION, '3.4', '>=')) { | ||
$twigConfig['default_path'] = __DIR__.'/Resources/views'; | ||
} | ||
$c->loadFromExtension('twig', $twigConfig); | ||
|
||
// FOSUserBundle config | ||
$c->loadFromExtension('fos_user', [ | ||
'user_class' => User::class, | ||
'db_driver' => 'orm', | ||
'firewall_name' => 'api', | ||
'from_email' => [ | ||
'address' => '[email protected]', | ||
'sender_name' => 'HackzillaTicketBundle', | ||
], | ||
'service' => [ | ||
'mailer' => 'fos_user.mailer.noop', | ||
], | ||
]); | ||
|
||
// HackzillaBundle config | ||
$c->loadFromExtension('hackzilla_ticket', [ | ||
'user_class' => User::class, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters