mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 09:31:04 +00:00
Merge pull request #2359 from wallabag/user-config
Create config even if user is disabled
This commit is contained in:
commit
f2ab290f0f
3 changed files with 0 additions and 44 deletions
20
.travis.yml
20
.travis.yml
|
@ -41,31 +41,11 @@ env:
|
|||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
# driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
|
||||
- php: hhvm-3.12
|
||||
sudo: required
|
||||
dist: trusty
|
||||
group: edge
|
||||
env: DB=mysql
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- mysql-server-5.6
|
||||
- mysql-client-core-5.6
|
||||
- mysql-client-5.6
|
||||
services:
|
||||
- mysql
|
||||
- php: hhvm-3.12
|
||||
sudo: required
|
||||
dist: trusty
|
||||
group: edge
|
||||
env: DB=sqlite
|
||||
- php: 7.0
|
||||
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite
|
||||
- php: 7.0
|
||||
env: DB=sqlite ASSETS=build
|
||||
allow_failures:
|
||||
- php: hhvm-3.12
|
||||
- php: 7.1
|
||||
- php: nightly
|
||||
|
||||
|
|
|
@ -45,10 +45,6 @@ class CreateConfigListener implements EventSubscriberInterface
|
|||
|
||||
public function createConfig(UserEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null)
|
||||
{
|
||||
if (!$event->getUser()->isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$config = new Config($event->getUser());
|
||||
$config->setTheme($this->theme);
|
||||
$config->setItemsPerPage($this->itemsOnPage);
|
||||
|
|
|
@ -41,26 +41,6 @@ class CreateConfigListenerTest extends \PHPUnit_Framework_TestCase
|
|||
$this->response = Response::create();
|
||||
}
|
||||
|
||||
public function testWithInvalidUser()
|
||||
{
|
||||
$user = new User();
|
||||
$user->setEnabled(false);
|
||||
|
||||
$event = new FilterUserResponseEvent(
|
||||
$user,
|
||||
$this->request,
|
||||
$this->response
|
||||
);
|
||||
|
||||
$this->em->expects($this->never())->method('persist');
|
||||
$this->em->expects($this->never())->method('flush');
|
||||
|
||||
$this->dispatcher->dispatch(
|
||||
FOSUserEvents::REGISTRATION_COMPLETED,
|
||||
$event
|
||||
);
|
||||
}
|
||||
|
||||
public function testWithValidUser()
|
||||
{
|
||||
$user = new User();
|
||||
|
|
Loading…
Reference in a new issue