aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-12-18 14:32:21 +0100
committerGitHub <noreply@github.com>2017-12-18 14:32:21 +0100
commitef5c8a7d01d7b3f0041455503499ab67e2206e0d (patch)
tree66fad00b695ceb24a5a3ee7ef3185c18050f316f
parent01ea7f585504fba74bd138386ca30ca4d26cfe65 (diff)
parentad880894a8dc0af97ee145f76ed10ca99e1ebf5a (diff)
downloadwallabag-ef5c8a7d01d7b3f0041455503499ab67e2206e0d.tar.gz
wallabag-ef5c8a7d01d7b3f0041455503499ab67e2206e0d.tar.zst
wallabag-ef5c8a7d01d7b3f0041455503499ab67e2206e0d.zip
Merge pull request #3515 from wallabag/php-7.2
Add PHP 7.2 compatibility
-rw-r--r--CHANGELOG.md7
-rw-r--r--app/config/parameters_test.yml1
-rw-r--r--composer.json2
-rw-r--r--phpunit.xml.dist2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php6
-rw-r--r--tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformerTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php19
-rw-r--r--tests/Wallabag/CoreBundle/Helper/CryptoProxyTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Helper/RedirectTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Tools/UtilsTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Command/ImportCommandTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/ChromeImportTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/ImportChainTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/ImportCompilerPassTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/PocketImportTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php3
-rw-r--r--tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php3
-rw-r--r--tests/Wallabag/UserBundle/EventListener/AuthenticationFailureListenerTest.php3
-rw-r--r--tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php3
-rw-r--r--tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php3
34 files changed, 81 insertions, 40 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef9d2131..9dc0ec04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,8 +11,9 @@
11### Changes 11### Changes
12 12
13- material: replace exit_to_app, redo and autorenew icons [#3513](https://github.com/wallabag/wallabag/pull/3513) 13- material: replace exit_to_app, redo and autorenew icons [#3513](https://github.com/wallabag/wallabag/pull/3513)
14- Add PHP 7.2 compatibility [#3515](https://github.com/wallabag/wallabag/pull/3515)
14 15
15## [2.3.0](https://github.com/wallabag/wallabag/tree/2.3.0) (2017-12-11) 16## [2.3.0](https://github.com/wallabag/wallabag/tree/2.3.0) (2017-12-11)
16 [Full Changelog](https://github.com/wallabag/wallabag/compare/2.2.3...2.3.0) 17 [Full Changelog](https://github.com/wallabag/wallabag/compare/2.2.3...2.3.0)
17 18
18### API 19### API
@@ -44,7 +45,7 @@
44### Features 45### Features
45 46
46- Share articles to Scuttle (https://github.com/scronide/scuttle) instance [#2999](https://github.com/wallabag/wallabag/pull/2999) 47- Share articles to Scuttle (https://github.com/scronide/scuttle) instance [#2999](https://github.com/wallabag/wallabag/pull/2999)
47- Allow to remove all archived entries [#3020](https://github.com/wallabag/wallabag/pull/3020) 48- Allow to remove all archived entries [#3020](https://github.com/wallabag/wallabag/pull/3020)
48- Added publication date and author [#3024](https://github.com/wallabag/wallabag/pull/3024) 49- Added publication date and author [#3024](https://github.com/wallabag/wallabag/pull/3024)
49- Added `notmatches` operator for automatic tagging rule [#3047](https://github.com/wallabag/wallabag/pull/3047) 50- Added `notmatches` operator for automatic tagging rule [#3047](https://github.com/wallabag/wallabag/pull/3047)
50- Search & paginate users [#3060](https://github.com/wallabag/wallabag/pull/3060) 51- Search & paginate users [#3060](https://github.com/wallabag/wallabag/pull/3060)
@@ -67,7 +68,7 @@
67- Changed default value for list mode (grid instead of list) [#3014](https://github.com/wallabag/wallabag/pull/3014) 68- Changed default value for list mode (grid instead of list) [#3014](https://github.com/wallabag/wallabag/pull/3014)
68- Remove `isPublic` from Entry entity [#3030](https://github.com/wallabag/wallabag/pull/3030) 69- Remove `isPublic` from Entry entity [#3030](https://github.com/wallabag/wallabag/pull/3030)
69- Use username to import [#3080](https://github.com/wallabag/wallabag/pull/3080) 70- Use username to import [#3080](https://github.com/wallabag/wallabag/pull/3080)
70- Adds Webpack support and remove Grunt [#3022](https://github.com/wallabag/wallabag/pull/3022) 71- Adds Webpack support and remove Grunt [#3022](https://github.com/wallabag/wallabag/pull/3022)
71- Improved Guzzle subscribers extensibility [#2751](https://github.com/wallabag/wallabag/pull/2751) 72- Improved Guzzle subscribers extensibility [#2751](https://github.com/wallabag/wallabag/pull/2751)
72- Added logger when we match Tagging rules [#3110](https://github.com/wallabag/wallabag/pull/3110) 73- Added logger when we match Tagging rules [#3110](https://github.com/wallabag/wallabag/pull/3110)
73- unify Download/Export wording. [#3130](https://github.com/wallabag/wallabag/pull/3130) 74- unify Download/Export wording. [#3130](https://github.com/wallabag/wallabag/pull/3130)
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml
index 257d2ace..64e51976 100644
--- a/app/config/parameters_test.yml
+++ b/app/config/parameters_test.yml
@@ -8,3 +8,4 @@ parameters:
8 test_database_path: "%env(TEST_DATABASE_PATH)%" 8 test_database_path: "%env(TEST_DATABASE_PATH)%"
9 env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" 9 env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite"
10 test_database_charset: utf8 10 test_database_charset: utf8
11 test_database_driver_class: ~
diff --git a/composer.json b/composer.json
index 23c7cdc2..dca274ed 100644
--- a/composer.json
+++ b/composer.json
@@ -94,7 +94,7 @@
94 "symfony/phpunit-bridge": "^3.3", 94 "symfony/phpunit-bridge": "^3.3",
95 "friendsofphp/php-cs-fixer": "~2.0", 95 "friendsofphp/php-cs-fixer": "~2.0",
96 "m6web/redis-mock": "^2.0", 96 "m6web/redis-mock": "^2.0",
97 "dama/doctrine-test-bundle": "^3.0" 97 "dama/doctrine-test-bundle": "^4.0"
98 }, 98 },
99 "scripts": { 99 "scripts": {
100 "post-cmd": [ 100 "post-cmd": [
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 591b0909..951b5a14 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -32,6 +32,6 @@
32 </filter> 32 </filter>
33 33
34 <listeners> 34 <listeners>
35 <listener class="\DAMA\DoctrineTestBundle\PHPUnit\LegacyPHPUnitListener" /> 35 <listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener" />
36 </listeners> 36 </listeners>
37</phpunit> 37</phpunit>
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index a02f9699..0e7e1576 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Helper\ContentProxy;
10 10
11class EntryControllerTest extends WallabagCoreTestCase 11class EntryControllerTest extends WallabagCoreTestCase
12{ 12{
13 const An_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'http://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html'; 13 const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'http://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html';
14 public $downloadImagesEnabled = false; 14 public $downloadImagesEnabled = false;
15 public $url = 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html'; 15 public $url = 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html';
16 16
@@ -1018,7 +1018,7 @@ class EntryControllerTest extends WallabagCoreTestCase
1018 $this->logInAs('admin'); 1018 $this->logInAs('admin');
1019 $client = $this->getClient(); 1019 $client = $this->getClient();
1020 1020
1021 $url = self::An_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE; 1021 $url = self::AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE;
1022 $client->getContainer()->get('craue_config')->set('download_images_enabled', 1); 1022 $client->getContainer()->get('craue_config')->set('download_images_enabled', 1);
1023 1023
1024 $crawler = $client->request('GET', '/new'); 1024 $crawler = $client->request('GET', '/new');
@@ -1060,7 +1060,7 @@ class EntryControllerTest extends WallabagCoreTestCase
1060 $this->logInAs('admin'); 1060 $this->logInAs('admin');
1061 $client = $this->getClient(); 1061 $client = $this->getClient();
1062 1062
1063 $url = self::An_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE; 1063 $url = self::AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE;
1064 $client->getContainer()->get('craue_config')->set('download_images_enabled', 1); 1064 $client->getContainer()->get('craue_config')->set('download_images_enabled', 1);
1065 1065
1066 $crawler = $client->request('GET', '/new'); 1066 $crawler = $client->request('GET', '/new');
diff --git a/tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php b/tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php
index 0dbd9f70..bc35d100 100644
--- a/tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php
+++ b/tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php
@@ -2,6 +2,7 @@
2 2
3namespace Tests\Wallabag\CoreBundle\Event\Listener; 3namespace Tests\Wallabag\CoreBundle\Event\Listener;
4 4
5use PHPUnit\Framework\TestCase;
5use Symfony\Component\EventDispatcher\EventDispatcher; 6use Symfony\Component\EventDispatcher\EventDispatcher;
6use Symfony\Component\HttpFoundation\Request; 7use Symfony\Component\HttpFoundation\Request;
7use Symfony\Component\HttpFoundation\Session\Session; 8use Symfony\Component\HttpFoundation\Session\Session;
@@ -11,7 +12,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
11use Symfony\Component\HttpKernel\KernelEvents; 12use Symfony\Component\HttpKernel\KernelEvents;
12use Wallabag\CoreBundle\Event\Listener\LocaleListener; 13use Wallabag\CoreBundle\Event\Listener\LocaleListener;
13 14
14class LocaleListenerTest extends \PHPUnit_Framework_TestCase 15class LocaleListenerTest extends TestCase
15{ 16{
16 public function testWithoutSession() 17 public function testWithoutSession()
17 { 18 {
diff --git a/tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php b/tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php
index 5ffe1ca6..93edfde8 100644
--- a/tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php
+++ b/tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php
@@ -2,6 +2,7 @@
2 2
3namespace Tests\Wallabag\CoreBundle\Event\Listener; 3namespace Tests\Wallabag\CoreBundle\Event\Listener;
4 4
5use PHPUnit\Framework\TestCase;
5use Symfony\Component\HttpFoundation\Request; 6use Symfony\Component\HttpFoundation\Request;
6use Symfony\Component\HttpFoundation\Session\Session; 7use Symfony\Component\HttpFoundation\Session\Session;
7use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; 8use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
@@ -11,7 +12,7 @@ use Wallabag\CoreBundle\Entity\Config;
11use Wallabag\CoreBundle\Event\Listener\UserLocaleListener; 12use Wallabag\CoreBundle\Event\Listener\UserLocaleListener;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
13 14
14class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase 15class UserLocaleListenerTest extends TestCase
15{ 16{
16 public function testWithLanguage() 17 public function testWithLanguage()
17 { 18 {
diff --git a/tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php b/tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php
index 64e3c6d9..06f85237 100644
--- a/tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php
+++ b/tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php
@@ -5,9 +5,10 @@ namespace Tests\Wallabag\CoreBundle\Event\Subscriber;
5use Doctrine\Common\EventManager; 5use Doctrine\Common\EventManager;
6use Doctrine\ORM\Event\LoadClassMetadataEventArgs; 6use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
7use Doctrine\ORM\Mapping\ClassMetadata; 7use Doctrine\ORM\Mapping\ClassMetadata;
8use PHPUnit\Framework\TestCase;
8use Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber; 9use Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber;
9 10
10class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase 11class TablePrefixSubscriberTest extends TestCase
11{ 12{
12 public function dataForPrefix() 13 public function dataForPrefix()
13 { 14 {
diff --git a/tests/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformerTest.php b/tests/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformerTest.php
index 0ec98c1f..ef058a8c 100644
--- a/tests/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformerTest.php
+++ b/tests/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformerTest.php
@@ -2,9 +2,10 @@
2 2
3namespace Tests\Wallabag\CoreBundle\Form\DataTransformer; 3namespace Tests\Wallabag\CoreBundle\Form\DataTransformer;
4 4
5use PHPUnit\Framework\TestCase;
5use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer; 6use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;
6 7
7class StringToListTransformerTest extends \PHPUnit_Framework_TestCase 8class StringToListTransformerTest extends TestCase
8{ 9{
9 /** 10 /**
10 * @dataProvider transformProvider 11 * @dataProvider transformProvider
diff --git a/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php b/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php
index 5aee9f5c..1173fc3d 100644
--- a/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php
+++ b/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php
@@ -5,11 +5,12 @@ namespace Tests\Wallabag\CoreBundle\GuzzleSiteAuthenticator;
5use Graby\SiteConfig\SiteConfig as GrabySiteConfig; 5use Graby\SiteConfig\SiteConfig as GrabySiteConfig;
6use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
7use Monolog\Logger; 7use Monolog\Logger;
8use PHPUnit\Framework\TestCase;
8use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; 9use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
9use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; 10use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
10use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder; 11use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder;
11 12
12class GrabySiteConfigBuilderTest extends \PHPUnit_Framework_TestCase 13class GrabySiteConfigBuilderTest extends TestCase
13{ 14{
14 /** @var \Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder */ 15 /** @var \Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder */
15 protected $builder; 16 protected $builder;
diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
index 5c99e461..398592e1 100644
--- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
@@ -5,6 +5,7 @@ namespace Tests\Wallabag\CoreBundle\Helper;
5use Graby\Graby; 5use Graby\Graby;
6use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
7use Monolog\Logger; 7use Monolog\Logger;
8use PHPUnit\Framework\TestCase;
8use Psr\Log\NullLogger; 9use Psr\Log\NullLogger;
9use Symfony\Component\Validator\ConstraintViolation; 10use Symfony\Component\Validator\ConstraintViolation;
10use Symfony\Component\Validator\ConstraintViolationList; 11use Symfony\Component\Validator\ConstraintViolationList;
@@ -15,7 +16,7 @@ use Wallabag\CoreBundle\Helper\ContentProxy;
15use Wallabag\CoreBundle\Helper\RuleBasedTagger; 16use Wallabag\CoreBundle\Helper\RuleBasedTagger;
16use Wallabag\UserBundle\Entity\User; 17use Wallabag\UserBundle\Entity\User;
17 18
18class ContentProxyTest extends \PHPUnit_Framework_TestCase 19class ContentProxyTest extends TestCase
19{ 20{
20 private $fetchingErrorMessage = 'wallabag can\'t retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.'; 21 private $fetchingErrorMessage = 'wallabag can\'t retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.';
21 22
@@ -220,7 +221,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
220 $tagger->expects($this->once()) 221 $tagger->expects($this->once())
221 ->method('tag'); 222 ->method('tag');
222 223
223 $validator = $this->getValidator(); 224 $validator = $this->getValidator(false);
224 $validator->expects($this->once()) 225 $validator->expects($this->once())
225 ->method('validate') 226 ->method('validate')
226 ->willReturn(new ConstraintViolationList([new ConstraintViolation('oops', 'oops', [], 'oops', 'language', 'dontexist')])); 227 ->willReturn(new ConstraintViolationList([new ConstraintViolation('oops', 'oops', [], 'oops', 'language', 'dontexist')]));
@@ -261,7 +262,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
261 $tagger->expects($this->once()) 262 $tagger->expects($this->once())
262 ->method('tag'); 263 ->method('tag');
263 264
264 $validator = $this->getValidator(); 265 $validator = $this->getValidator(false);
265 $validator->expects($this->exactly(2)) 266 $validator->expects($this->exactly(2))
266 ->method('validate') 267 ->method('validate')
267 ->will($this->onConsecutiveCalls( 268 ->will($this->onConsecutiveCalls(
@@ -544,11 +545,19 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
544 return new NullLogger(); 545 return new NullLogger();
545 } 546 }
546 547
547 private function getValidator() 548 private function getValidator($withDefaultMock = true)
548 { 549 {
549 return $this->getMockBuilder(RecursiveValidator::class) 550 $mock = $this->getMockBuilder(RecursiveValidator::class)
550 ->setMethods(['validate']) 551 ->setMethods(['validate'])
551 ->disableOriginalConstructor() 552 ->disableOriginalConstructor()
552 ->getMock(); 553 ->getMock();
554
555 if ($withDefaultMock) {
556 $mock->expects($this->any())
557 ->method('validate')
558 ->willReturn(new ConstraintViolationList());
559 }
560
561 return $mock;
553 } 562 }
554} 563}
diff --git a/tests/Wallabag/CoreBundle/Helper/CryptoProxyTest.php b/tests/Wallabag/CoreBundle/Helper/CryptoProxyTest.php
index 782c29c3..7398f235 100644
--- a/tests/Wallabag/CoreBundle/Helper/CryptoProxyTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/CryptoProxyTest.php
@@ -4,10 +4,11 @@ namespace Tests\Wallabag\CoreBundle\Helper;
4 4
5use Monolog\Handler\TestHandler; 5use Monolog\Handler\TestHandler;
6use Monolog\Logger; 6use Monolog\Logger;
7use PHPUnit\Framework\TestCase;
7use Psr\Log\NullLogger; 8use Psr\Log\NullLogger;
8use Wallabag\CoreBundle\Helper\CryptoProxy; 9use Wallabag\CoreBundle\Helper\CryptoProxy;
9 10
10class CryptoProxyTest extends \PHPUnit_Framework_TestCase 11class CryptoProxyTest extends TestCase
11{ 12{
12 public function testCrypto() 13 public function testCrypto()
13 { 14 {
diff --git a/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php b/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php
index c61f65d0..0e1d296b 100644
--- a/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php
@@ -8,9 +8,10 @@ use GuzzleHttp\Stream\Stream;
8use GuzzleHttp\Subscriber\Mock; 8use GuzzleHttp\Subscriber\Mock;
9use Monolog\Handler\TestHandler; 9use Monolog\Handler\TestHandler;
10use Monolog\Logger; 10use Monolog\Logger;
11use PHPUnit\Framework\TestCase;
11use Wallabag\CoreBundle\Helper\DownloadImages; 12use Wallabag\CoreBundle\Helper\DownloadImages;
12 13
13class DownloadImagesTest extends \PHPUnit_Framework_TestCase 14class DownloadImagesTest extends TestCase
14{ 15{
15 public function dataForSuccessImage() 16 public function dataForSuccessImage()
16 { 17 {
diff --git a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
index 7fd2ea2b..04e1a59c 100644
--- a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
@@ -2,13 +2,14 @@
2 2
3namespace Tests\Wallabag\CoreBundle\Helper; 3namespace Tests\Wallabag\CoreBundle\Helper;
4 4
5use PHPUnit\Framework\TestCase;
5use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; 6use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
6use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; 7use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
7use Wallabag\CoreBundle\Entity\Config; 8use Wallabag\CoreBundle\Entity\Config;
8use Wallabag\CoreBundle\Helper\Redirect; 9use Wallabag\CoreBundle\Helper\Redirect;
9use Wallabag\UserBundle\Entity\User; 10use Wallabag\UserBundle\Entity\User;
10 11
11class RedirectTest extends \PHPUnit_Framework_TestCase 12class RedirectTest extends TestCase
12{ 13{
13 /** @var \PHPUnit_Framework_MockObject_MockObject */ 14 /** @var \PHPUnit_Framework_MockObject_MockObject */
14 private $routerMock; 15 private $routerMock;
diff --git a/tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php b/tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php
index c31af680..74b28bbb 100644
--- a/tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php
@@ -4,6 +4,7 @@ namespace Tests\Wallabag\CoreBundle\Helper;
4 4
5use Monolog\Handler\TestHandler; 5use Monolog\Handler\TestHandler;
6use Monolog\Logger; 6use Monolog\Logger;
7use PHPUnit\Framework\TestCase;
7use Wallabag\CoreBundle\Entity\Config; 8use Wallabag\CoreBundle\Entity\Config;
8use Wallabag\CoreBundle\Entity\Entry; 9use Wallabag\CoreBundle\Entity\Entry;
9use Wallabag\CoreBundle\Entity\Tag; 10use Wallabag\CoreBundle\Entity\Tag;
@@ -11,7 +12,7 @@ use Wallabag\CoreBundle\Entity\TaggingRule;
11use Wallabag\CoreBundle\Helper\RuleBasedTagger; 12use Wallabag\CoreBundle\Helper\RuleBasedTagger;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
13 14
14class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase 15class RuleBasedTaggerTest extends TestCase
15{ 16{
16 private $rulerz; 17 private $rulerz;
17 private $tagRepository; 18 private $tagRepository;
diff --git a/tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php b/tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php
index 475cd349..1285c99c 100644
--- a/tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php
@@ -2,13 +2,14 @@
2 2
3namespace Tests\Wallabag\CoreBundle\Helper; 3namespace Tests\Wallabag\CoreBundle\Helper;
4 4
5use PHPUnit\Framework\TestCase;
5use Wallabag\CoreBundle\Entity\Entry; 6use Wallabag\CoreBundle\Entity\Entry;
6use Wallabag\CoreBundle\Entity\Tag; 7use Wallabag\CoreBundle\Entity\Tag;
7use Wallabag\CoreBundle\Helper\TagsAssigner; 8use Wallabag\CoreBundle\Helper\TagsAssigner;
8use Wallabag\CoreBundle\Repository\TagRepository; 9use Wallabag\CoreBundle\Repository\TagRepository;
9use Wallabag\UserBundle\Entity\User; 10use Wallabag\UserBundle\Entity\User;
10 11
11class TagsAssignerTest extends \PHPUnit_Framework_TestCase 12class TagsAssignerTest extends TestCase
12{ 13{
13 public function testAssignTagsWithArrayAndExtraSpaces() 14 public function testAssignTagsWithArrayAndExtraSpaces()
14 { 15 {
diff --git a/tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php b/tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php
index 74c645ef..b044a700 100644
--- a/tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php
+++ b/tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php
@@ -2,12 +2,13 @@
2 2
3namespace Tests\Wallabag\CoreBundle\Command; 3namespace Tests\Wallabag\CoreBundle\Command;
4 4
5use PHPUnit\Framework\TestCase;
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; 6use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
6use Symfony\Component\HttpFoundation\Request; 7use Symfony\Component\HttpFoundation\Request;
7use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter; 8use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
8use Wallabag\UserBundle\Entity\User; 9use Wallabag\UserBundle\Entity\User;
9 10
10class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase 11class UsernameRssTokenConverterTest extends TestCase
11{ 12{
12 public function testSupportsWithNoRegistry() 13 public function testSupportsWithNoRegistry()
13 { 14 {
diff --git a/tests/Wallabag/CoreBundle/Tools/UtilsTest.php b/tests/Wallabag/CoreBundle/Tools/UtilsTest.php
index 4521e485..347589dc 100644
--- a/tests/Wallabag/CoreBundle/Tools/UtilsTest.php
+++ b/tests/Wallabag/CoreBundle/Tools/UtilsTest.php
@@ -2,10 +2,11 @@
2 2
3namespace Tests\Wallabag\CoreBundle\Tools; 3namespace Tests\Wallabag\CoreBundle\Tools;
4 4
5use PHPUnit\Framework\TestCase;
5use Symfony\Component\Finder\Finder; 6use Symfony\Component\Finder\Finder;
6use Wallabag\CoreBundle\Tools\Utils; 7use Wallabag\CoreBundle\Tools\Utils;
7 8
8class UtilsTest extends \PHPUnit_Framework_TestCase 9class UtilsTest extends TestCase
9{ 10{
10 /** 11 /**
11 * @dataProvider examples 12 * @dataProvider examples
diff --git a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
index 82336060..bb92f745 100644
--- a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
+++ b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
@@ -2,9 +2,10 @@
2 2
3namespace Tests\Wallabag\CoreBundle\Twig; 3namespace Tests\Wallabag\CoreBundle\Twig;
4 4
5use PHPUnit\Framework\TestCase;
5use Wallabag\CoreBundle\Twig\WallabagExtension; 6use Wallabag\CoreBundle\Twig\WallabagExtension;
6 7
7class WallabagExtensionTest extends \PHPUnit_Framework_TestCase 8class WallabagExtensionTest extends TestCase
8{ 9{
9 public function testRemoveWww() 10 public function testRemoveWww()
10 { 11 {
diff --git a/tests/Wallabag/ImportBundle/Command/ImportCommandTest.php b/tests/Wallabag/ImportBundle/Command/ImportCommandTest.php
index 30aee4d8..f95320a4 100644
--- a/tests/Wallabag/ImportBundle/Command/ImportCommandTest.php
+++ b/tests/Wallabag/ImportBundle/Command/ImportCommandTest.php
@@ -97,5 +97,8 @@ class ImportCommandTest extends WallabagCoreTestCase
97 '--useUserId' => true, 97 '--useUserId' => true,
98 '--importer' => 'v2', 98 '--importer' => 'v2',
99 ]); 99 ]);
100
101 $this->assertContains('imported', $tester->getDisplay());
102 $this->assertContains('already saved', $tester->getDisplay());
100 } 103 }
101} 104}
diff --git a/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php b/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php
index 52b98a0b..b2141c04 100644
--- a/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php
+++ b/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php
@@ -3,11 +3,12 @@
3namespace Tests\Wallabag\ImportBundle\Consumer\AMQP; 3namespace Tests\Wallabag\ImportBundle\Consumer\AMQP;
4 4
5use PhpAmqpLib\Message\AMQPMessage; 5use PhpAmqpLib\Message\AMQPMessage;
6use PHPUnit\Framework\TestCase;
6use Wallabag\CoreBundle\Entity\Entry; 7use Wallabag\CoreBundle\Entity\Entry;
7use Wallabag\ImportBundle\Consumer\AMQPEntryConsumer; 8use Wallabag\ImportBundle\Consumer\AMQPEntryConsumer;
8use Wallabag\UserBundle\Entity\User; 9use Wallabag\UserBundle\Entity\User;
9 10
10class AMQPEntryConsumerTest extends \PHPUnit_Framework_TestCase 11class AMQPEntryConsumerTest extends TestCase
11{ 12{
12 public function testMessageOk() 13 public function testMessageOk()
13 { 14 {
diff --git a/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php b/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php
index 9506ff63..61337e47 100644
--- a/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php
+++ b/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php
@@ -2,11 +2,12 @@
2 2
3namespace Tests\Wallabag\ImportBundle\Consumer\AMQP; 3namespace Tests\Wallabag\ImportBundle\Consumer\AMQP;
4 4
5use PHPUnit\Framework\TestCase;
5use Wallabag\CoreBundle\Entity\Entry; 6use Wallabag\CoreBundle\Entity\Entry;
6use Wallabag\ImportBundle\Consumer\RedisEntryConsumer; 7use Wallabag\ImportBundle\Consumer\RedisEntryConsumer;
7use Wallabag\UserBundle\Entity\User; 8use Wallabag\UserBundle\Entity\User;
8 9
9class RedisEntryConsumerTest extends \PHPUnit_Framework_TestCase 10class RedisEntryConsumerTest extends TestCase
10{ 11{
11 public function testMessageOk() 12 public function testMessageOk()
12 { 13 {
diff --git a/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php b/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php
index 5559ac7e..12a789e0 100644
--- a/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php
@@ -5,13 +5,14 @@ namespace Tests\Wallabag\ImportBundle\Import;
5use M6Web\Component\RedisMock\RedisMockFactory; 5use M6Web\Component\RedisMock\RedisMockFactory;
6use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
7use Monolog\Logger; 7use Monolog\Logger;
8use PHPUnit\Framework\TestCase;
8use Simpleue\Queue\RedisQueue; 9use Simpleue\Queue\RedisQueue;
9use Wallabag\CoreBundle\Entity\Entry; 10use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\ImportBundle\Import\ChromeImport; 11use Wallabag\ImportBundle\Import\ChromeImport;
11use Wallabag\ImportBundle\Redis\Producer; 12use Wallabag\ImportBundle\Redis\Producer;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
13 14
14class ChromeImportTest extends \PHPUnit_Framework_TestCase 15class ChromeImportTest extends TestCase
15{ 16{
16 protected $user; 17 protected $user;
17 protected $em; 18 protected $em;
diff --git a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php b/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php
index a1783bfc..eaf69377 100644
--- a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php
@@ -5,13 +5,14 @@ namespace Tests\Wallabag\ImportBundle\Import;
5use M6Web\Component\RedisMock\RedisMockFactory; 5use M6Web\Component\RedisMock\RedisMockFactory;
6use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
7use Monolog\Logger; 7use Monolog\Logger;
8use PHPUnit\Framework\TestCase;
8use Simpleue\Queue\RedisQueue; 9use Simpleue\Queue\RedisQueue;
9use Wallabag\CoreBundle\Entity\Entry; 10use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\ImportBundle\Import\FirefoxImport; 11use Wallabag\ImportBundle\Import\FirefoxImport;
11use Wallabag\ImportBundle\Redis\Producer; 12use Wallabag\ImportBundle\Redis\Producer;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
13 14
14class FirefoxImportTest extends \PHPUnit_Framework_TestCase 15class FirefoxImportTest extends TestCase
15{ 16{
16 protected $user; 17 protected $user;
17 protected $em; 18 protected $em;
diff --git a/tests/Wallabag/ImportBundle/Import/ImportChainTest.php b/tests/Wallabag/ImportBundle/Import/ImportChainTest.php
index a9a9915e..f27826f4 100644
--- a/tests/Wallabag/ImportBundle/Import/ImportChainTest.php
+++ b/tests/Wallabag/ImportBundle/Import/ImportChainTest.php
@@ -2,9 +2,10 @@
2 2
3namespace Tests\Wallabag\ImportBundle\Import; 3namespace Tests\Wallabag\ImportBundle\Import;
4 4
5use PHPUnit\Framework\TestCase;
5use Wallabag\ImportBundle\Import\ImportChain; 6use Wallabag\ImportBundle\Import\ImportChain;
6 7
7class ImportChainTest extends \PHPUnit_Framework_TestCase 8class ImportChainTest extends TestCase
8{ 9{
9 public function testGetAll() 10 public function testGetAll()
10 { 11 {
diff --git a/tests/Wallabag/ImportBundle/Import/ImportCompilerPassTest.php b/tests/Wallabag/ImportBundle/Import/ImportCompilerPassTest.php
index 207054f4..e0e90ae3 100644
--- a/tests/Wallabag/ImportBundle/Import/ImportCompilerPassTest.php
+++ b/tests/Wallabag/ImportBundle/Import/ImportCompilerPassTest.php
@@ -2,10 +2,11 @@
2 2
3namespace Tests\Wallabag\ImportBundle\Import; 3namespace Tests\Wallabag\ImportBundle\Import;
4 4
5use PHPUnit\Framework\TestCase;
5use Symfony\Component\DependencyInjection\ContainerBuilder; 6use Symfony\Component\DependencyInjection\ContainerBuilder;
6use Wallabag\ImportBundle\Import\ImportCompilerPass; 7use Wallabag\ImportBundle\Import\ImportCompilerPass;
7 8
8class ImportCompilerPassTest extends \PHPUnit_Framework_TestCase 9class ImportCompilerPassTest extends TestCase
9{ 10{
10 public function testProcessNoDefinition() 11 public function testProcessNoDefinition()
11 { 12 {
diff --git a/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php b/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php
index 274dc326..b5163fad 100644
--- a/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php
@@ -5,13 +5,14 @@ namespace Tests\Wallabag\ImportBundle\Import;
5use M6Web\Component\RedisMock\RedisMockFactory; 5use M6Web\Component\RedisMock\RedisMockFactory;
6use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
7use Monolog\Logger; 7use Monolog\Logger;
8use PHPUnit\Framework\TestCase;
8use Simpleue\Queue\RedisQueue; 9use Simpleue\Queue\RedisQueue;
9use Wallabag\CoreBundle\Entity\Entry; 10use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\ImportBundle\Import\InstapaperImport; 11use Wallabag\ImportBundle\Import\InstapaperImport;
11use Wallabag\ImportBundle\Redis\Producer; 12use Wallabag\ImportBundle\Redis\Producer;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
13 14
14class InstapaperImportTest extends \PHPUnit_Framework_TestCase 15class InstapaperImportTest extends TestCase
15{ 16{
16 protected $user; 17 protected $user;
17 protected $em; 18 protected $em;
diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
index fe59f867..baa5d905 100644
--- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
@@ -9,6 +9,7 @@ use GuzzleHttp\Subscriber\Mock;
9use M6Web\Component\RedisMock\RedisMockFactory; 9use M6Web\Component\RedisMock\RedisMockFactory;
10use Monolog\Handler\TestHandler; 10use Monolog\Handler\TestHandler;
11use Monolog\Logger; 11use Monolog\Logger;
12use PHPUnit\Framework\TestCase;
12use Simpleue\Queue\RedisQueue; 13use Simpleue\Queue\RedisQueue;
13use Wallabag\CoreBundle\Entity\Config; 14use Wallabag\CoreBundle\Entity\Config;
14use Wallabag\CoreBundle\Entity\Entry; 15use Wallabag\CoreBundle\Entity\Entry;
@@ -16,7 +17,7 @@ use Wallabag\ImportBundle\Import\PocketImport;
16use Wallabag\ImportBundle\Redis\Producer; 17use Wallabag\ImportBundle\Redis\Producer;
17use Wallabag\UserBundle\Entity\User; 18use Wallabag\UserBundle\Entity\User;
18 19
19class PocketImportTest extends \PHPUnit_Framework_TestCase 20class PocketImportTest extends TestCase
20{ 21{
21 protected $token; 22 protected $token;
22 protected $user; 23 protected $user;
diff --git a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php
index 1822cdaa..e55a56e0 100644
--- a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php
@@ -5,13 +5,14 @@ namespace Tests\Wallabag\ImportBundle\Import;
5use M6Web\Component\RedisMock\RedisMockFactory; 5use M6Web\Component\RedisMock\RedisMockFactory;
6use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
7use Monolog\Logger; 7use Monolog\Logger;
8use PHPUnit\Framework\TestCase;
8use Simpleue\Queue\RedisQueue; 9use Simpleue\Queue\RedisQueue;
9use Wallabag\CoreBundle\Entity\Entry; 10use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\ImportBundle\Import\ReadabilityImport; 11use Wallabag\ImportBundle\Import\ReadabilityImport;
11use Wallabag\ImportBundle\Redis\Producer; 12use Wallabag\ImportBundle\Redis\Producer;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
13 14
14class ReadabilityImportTest extends \PHPUnit_Framework_TestCase 15class ReadabilityImportTest extends TestCase
15{ 16{
16 protected $user; 17 protected $user;
17 protected $em; 18 protected $em;
diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
index 822ad694..4e9f472d 100644
--- a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php
@@ -5,13 +5,14 @@ namespace Tests\Wallabag\ImportBundle\Import;
5use M6Web\Component\RedisMock\RedisMockFactory; 5use M6Web\Component\RedisMock\RedisMockFactory;
6use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
7use Monolog\Logger; 7use Monolog\Logger;
8use PHPUnit\Framework\TestCase;
8use Simpleue\Queue\RedisQueue; 9use Simpleue\Queue\RedisQueue;
9use Wallabag\CoreBundle\Entity\Entry; 10use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\ImportBundle\Import\WallabagV1Import; 11use Wallabag\ImportBundle\Import\WallabagV1Import;
11use Wallabag\ImportBundle\Redis\Producer; 12use Wallabag\ImportBundle\Redis\Producer;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
13 14
14class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase 15class WallabagV1ImportTest extends TestCase
15{ 16{
16 protected $user; 17 protected $user;
17 protected $em; 18 protected $em;
diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
index fab50a45..68a5d1ad 100644
--- a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
@@ -5,13 +5,14 @@ namespace Tests\Wallabag\ImportBundle\Import;
5use M6Web\Component\RedisMock\RedisMockFactory; 5use M6Web\Component\RedisMock\RedisMockFactory;
6use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
7use Monolog\Logger; 7use Monolog\Logger;
8use PHPUnit\Framework\TestCase;
8use Simpleue\Queue\RedisQueue; 9use Simpleue\Queue\RedisQueue;
9use Wallabag\CoreBundle\Entity\Entry; 10use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\ImportBundle\Import\WallabagV2Import; 11use Wallabag\ImportBundle\Import\WallabagV2Import;
11use Wallabag\ImportBundle\Redis\Producer; 12use Wallabag\ImportBundle\Redis\Producer;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
13 14
14class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase 15class WallabagV2ImportTest extends TestCase
15{ 16{
16 protected $user; 17 protected $user;
17 protected $em; 18 protected $em;
diff --git a/tests/Wallabag/UserBundle/EventListener/AuthenticationFailureListenerTest.php b/tests/Wallabag/UserBundle/EventListener/AuthenticationFailureListenerTest.php
index 9e33cdca..6e37cfc4 100644
--- a/tests/Wallabag/UserBundle/EventListener/AuthenticationFailureListenerTest.php
+++ b/tests/Wallabag/UserBundle/EventListener/AuthenticationFailureListenerTest.php
@@ -4,6 +4,7 @@ namespace Tests\Wallabag\UserBundle\EventListener;
4 4
5use Monolog\Handler\TestHandler; 5use Monolog\Handler\TestHandler;
6use Monolog\Logger; 6use Monolog\Logger;
7use PHPUnit\Framework\TestCase;
7use Symfony\Component\EventDispatcher\EventDispatcher; 8use Symfony\Component\EventDispatcher\EventDispatcher;
8use Symfony\Component\HttpFoundation\Request; 9use Symfony\Component\HttpFoundation\Request;
9use Symfony\Component\HttpFoundation\RequestStack; 10use Symfony\Component\HttpFoundation\RequestStack;
@@ -11,7 +12,7 @@ use Symfony\Component\Security\Core\AuthenticationEvents;
11use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent; 12use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
12use Wallabag\UserBundle\EventListener\AuthenticationFailureListener; 13use Wallabag\UserBundle\EventListener\AuthenticationFailureListener;
13 14
14class AuthenticationFailureListenerTest extends \PHPUnit_Framework_TestCase 15class AuthenticationFailureListenerTest extends TestCase
15{ 16{
16 private $requestStack; 17 private $requestStack;
17 private $logHandler; 18 private $logHandler;
diff --git a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php
index e5a145b8..2b540fdf 100644
--- a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php
+++ b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php
@@ -4,6 +4,7 @@ namespace Tests\Wallabag\UserBundle\EventListener;
4 4
5use FOS\UserBundle\Event\FilterUserResponseEvent; 5use FOS\UserBundle\Event\FilterUserResponseEvent;
6use FOS\UserBundle\FOSUserEvents; 6use FOS\UserBundle\FOSUserEvents;
7use PHPUnit\Framework\TestCase;
7use Symfony\Component\EventDispatcher\EventDispatcher; 8use Symfony\Component\EventDispatcher\EventDispatcher;
8use Symfony\Component\HttpFoundation\Request; 9use Symfony\Component\HttpFoundation\Request;
9use Symfony\Component\HttpFoundation\Response; 10use Symfony\Component\HttpFoundation\Response;
@@ -11,7 +12,7 @@ use Wallabag\CoreBundle\Entity\Config;
11use Wallabag\UserBundle\Entity\User; 12use Wallabag\UserBundle\Entity\User;
12use Wallabag\UserBundle\EventListener\CreateConfigListener; 13use Wallabag\UserBundle\EventListener\CreateConfigListener;
13 14
14class CreateConfigListenerTest extends \PHPUnit_Framework_TestCase 15class CreateConfigListenerTest extends TestCase
15{ 16{
16 private $em; 17 private $em;
17 private $listener; 18 private $listener;
diff --git a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php
index 7381ccf1..f39fa60e 100644
--- a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php
+++ b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php
@@ -2,6 +2,7 @@
2 2
3namespace Tests\Wallabag\UserBundle\Mailer; 3namespace Tests\Wallabag\UserBundle\Mailer;
4 4
5use PHPUnit\Framework\TestCase;
5use Wallabag\UserBundle\Entity\User; 6use Wallabag\UserBundle\Entity\User;
6use Wallabag\UserBundle\Mailer\AuthCodeMailer; 7use Wallabag\UserBundle\Mailer\AuthCodeMailer;
7 8
@@ -21,7 +22,7 @@ final class CountableMemorySpool extends \Swift_MemorySpool implements \Countabl
21 } 22 }
22} 23}
23 24
24class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase 25class AuthCodeMailerTest extends TestCase
25{ 26{
26 protected $mailer; 27 protected $mailer;
27 protected $spool; 28 protected $spool;