### Changes
- material: replace exit_to_app, redo and autorenew icons [#3513](https://github.com/wallabag/wallabag/pull/3513)
+- Add PHP 7.2 compatibility [#3515](https://github.com/wallabag/wallabag/pull/3515)
-## [2.3.0](https://github.com/wallabag/wallabag/tree/2.3.0) (2017-12-11)
+## [2.3.0](https://github.com/wallabag/wallabag/tree/2.3.0) (2017-12-11)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.2.3...2.3.0)
### API
### Features
- Share articles to Scuttle (https://github.com/scronide/scuttle) instance [#2999](https://github.com/wallabag/wallabag/pull/2999)
-- Allow to remove all archived entries [#3020](https://github.com/wallabag/wallabag/pull/3020)
+- Allow to remove all archived entries [#3020](https://github.com/wallabag/wallabag/pull/3020)
- Added publication date and author [#3024](https://github.com/wallabag/wallabag/pull/3024)
- Added `notmatches` operator for automatic tagging rule [#3047](https://github.com/wallabag/wallabag/pull/3047)
- Search & paginate users [#3060](https://github.com/wallabag/wallabag/pull/3060)
- Changed default value for list mode (grid instead of list) [#3014](https://github.com/wallabag/wallabag/pull/3014)
- Remove `isPublic` from Entry entity [#3030](https://github.com/wallabag/wallabag/pull/3030)
- Use username to import [#3080](https://github.com/wallabag/wallabag/pull/3080)
-- Adds Webpack support and remove Grunt [#3022](https://github.com/wallabag/wallabag/pull/3022)
+- Adds Webpack support and remove Grunt [#3022](https://github.com/wallabag/wallabag/pull/3022)
- Improved Guzzle subscribers extensibility [#2751](https://github.com/wallabag/wallabag/pull/2751)
- Added logger when we match Tagging rules [#3110](https://github.com/wallabag/wallabag/pull/3110)
- unify Download/Export wording. [#3130](https://github.com/wallabag/wallabag/pull/3130)
test_database_path: "%env(TEST_DATABASE_PATH)%"
env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite"
test_database_charset: utf8
+ test_database_driver_class: ~
"symfony/phpunit-bridge": "^3.3",
"friendsofphp/php-cs-fixer": "~2.0",
"m6web/redis-mock": "^2.0",
- "dama/doctrine-test-bundle": "^3.0"
+ "dama/doctrine-test-bundle": "^4.0"
},
"scripts": {
"post-cmd": [
</filter>
<listeners>
- <listener class="\DAMA\DoctrineTestBundle\PHPUnit\LegacyPHPUnitListener" />
+ <listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener" />
</listeners>
</phpunit>
class EntryControllerTest extends WallabagCoreTestCase
{
- 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';
+ 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';
public $downloadImagesEnabled = false;
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';
$this->logInAs('admin');
$client = $this->getClient();
- $url = self::An_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE;
+ $url = self::AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE;
$client->getContainer()->get('craue_config')->set('download_images_enabled', 1);
$crawler = $client->request('GET', '/new');
$this->logInAs('admin');
$client = $this->getClient();
- $url = self::An_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE;
+ $url = self::AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE;
$client->getContainer()->get('craue_config')->set('download_images_enabled', 1);
$crawler = $client->request('GET', '/new');
namespace Tests\Wallabag\CoreBundle\Event\Listener;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpKernel\KernelEvents;
use Wallabag\CoreBundle\Event\Listener\LocaleListener;
-class LocaleListenerTest extends \PHPUnit_Framework_TestCase
+class LocaleListenerTest extends TestCase
{
public function testWithoutSession()
{
namespace Tests\Wallabag\CoreBundle\Event\Listener;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
use Wallabag\CoreBundle\Event\Listener\UserLocaleListener;
use Wallabag\UserBundle\Entity\User;
-class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase
+class UserLocaleListenerTest extends TestCase
{
public function testWithLanguage()
{
use Doctrine\Common\EventManager;
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
use Doctrine\ORM\Mapping\ClassMetadata;
+use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber;
-class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase
+class TablePrefixSubscriberTest extends TestCase
{
public function dataForPrefix()
{
namespace Tests\Wallabag\CoreBundle\Form\DataTransformer;
+use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;
-class StringToListTransformerTest extends \PHPUnit_Framework_TestCase
+class StringToListTransformerTest extends TestCase
{
/**
* @dataProvider transformProvider
use Graby\SiteConfig\SiteConfig as GrabySiteConfig;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder;
-class GrabySiteConfigBuilderTest extends \PHPUnit_Framework_TestCase
+class GrabySiteConfigBuilderTest extends TestCase
{
/** @var \Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder */
protected $builder;
use Graby\Graby;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
use Symfony\Component\Validator\ConstraintViolation;
use Symfony\Component\Validator\ConstraintViolationList;
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
use Wallabag\UserBundle\Entity\User;
-class ContentProxyTest extends \PHPUnit_Framework_TestCase
+class ContentProxyTest extends TestCase
{
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>.';
$tagger->expects($this->once())
->method('tag');
- $validator = $this->getValidator();
+ $validator = $this->getValidator(false);
$validator->expects($this->once())
->method('validate')
->willReturn(new ConstraintViolationList([new ConstraintViolation('oops', 'oops', [], 'oops', 'language', 'dontexist')]));
$tagger->expects($this->once())
->method('tag');
- $validator = $this->getValidator();
+ $validator = $this->getValidator(false);
$validator->expects($this->exactly(2))
->method('validate')
->will($this->onConsecutiveCalls(
return new NullLogger();
}
- private function getValidator()
+ private function getValidator($withDefaultMock = true)
{
- return $this->getMockBuilder(RecursiveValidator::class)
+ $mock = $this->getMockBuilder(RecursiveValidator::class)
->setMethods(['validate'])
->disableOriginalConstructor()
->getMock();
+
+ if ($withDefaultMock) {
+ $mock->expects($this->any())
+ ->method('validate')
+ ->willReturn(new ConstraintViolationList());
+ }
+
+ return $mock;
}
}
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
use Wallabag\CoreBundle\Helper\CryptoProxy;
-class CryptoProxyTest extends \PHPUnit_Framework_TestCase
+class CryptoProxyTest extends TestCase
{
public function testCrypto()
{
use GuzzleHttp\Subscriber\Mock;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Helper\DownloadImages;
-class DownloadImagesTest extends \PHPUnit_Framework_TestCase
+class DownloadImagesTest extends TestCase
{
public function dataForSuccessImage()
{
namespace Tests\Wallabag\CoreBundle\Helper;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Helper\Redirect;
use Wallabag\UserBundle\Entity\User;
-class RedirectTest extends \PHPUnit_Framework_TestCase
+class RedirectTest extends TestCase
{
/** @var \PHPUnit_Framework_MockObject_MockObject */
private $routerMock;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
use Wallabag\UserBundle\Entity\User;
-class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase
+class RuleBasedTaggerTest extends TestCase
{
private $rulerz;
private $tagRepository;
namespace Tests\Wallabag\CoreBundle\Helper;
+use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\TagRepository;
use Wallabag\UserBundle\Entity\User;
-class TagsAssignerTest extends \PHPUnit_Framework_TestCase
+class TagsAssignerTest extends TestCase
{
public function testAssignTagsWithArrayAndExtraSpaces()
{
namespace Tests\Wallabag\CoreBundle\Command;
+use PHPUnit\Framework\TestCase;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Request;
use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
use Wallabag\UserBundle\Entity\User;
-class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase
+class UsernameRssTokenConverterTest extends TestCase
{
public function testSupportsWithNoRegistry()
{
namespace Tests\Wallabag\CoreBundle\Tools;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\Finder\Finder;
use Wallabag\CoreBundle\Tools\Utils;
-class UtilsTest extends \PHPUnit_Framework_TestCase
+class UtilsTest extends TestCase
{
/**
* @dataProvider examples
namespace Tests\Wallabag\CoreBundle\Twig;
+use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Twig\WallabagExtension;
-class WallabagExtensionTest extends \PHPUnit_Framework_TestCase
+class WallabagExtensionTest extends TestCase
{
public function testRemoveWww()
{
'--useUserId' => true,
'--importer' => 'v2',
]);
+
+ $this->assertContains('imported', $tester->getDisplay());
+ $this->assertContains('already saved', $tester->getDisplay());
}
}
namespace Tests\Wallabag\ImportBundle\Consumer\AMQP;
use PhpAmqpLib\Message\AMQPMessage;
+use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Consumer\AMQPEntryConsumer;
use Wallabag\UserBundle\Entity\User;
-class AMQPEntryConsumerTest extends \PHPUnit_Framework_TestCase
+class AMQPEntryConsumerTest extends TestCase
{
public function testMessageOk()
{
namespace Tests\Wallabag\ImportBundle\Consumer\AMQP;
+use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Consumer\RedisEntryConsumer;
use Wallabag\UserBundle\Entity\User;
-class RedisEntryConsumerTest extends \PHPUnit_Framework_TestCase
+class RedisEntryConsumerTest extends TestCase
{
public function testMessageOk()
{
use M6Web\Component\RedisMock\RedisMockFactory;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Simpleue\Queue\RedisQueue;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Import\ChromeImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
-class ChromeImportTest extends \PHPUnit_Framework_TestCase
+class ChromeImportTest extends TestCase
{
protected $user;
protected $em;
use M6Web\Component\RedisMock\RedisMockFactory;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Simpleue\Queue\RedisQueue;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Import\FirefoxImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
-class FirefoxImportTest extends \PHPUnit_Framework_TestCase
+class FirefoxImportTest extends TestCase
{
protected $user;
protected $em;
namespace Tests\Wallabag\ImportBundle\Import;
+use PHPUnit\Framework\TestCase;
use Wallabag\ImportBundle\Import\ImportChain;
-class ImportChainTest extends \PHPUnit_Framework_TestCase
+class ImportChainTest extends TestCase
{
public function testGetAll()
{
namespace Tests\Wallabag\ImportBundle\Import;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Wallabag\ImportBundle\Import\ImportCompilerPass;
-class ImportCompilerPassTest extends \PHPUnit_Framework_TestCase
+class ImportCompilerPassTest extends TestCase
{
public function testProcessNoDefinition()
{
use M6Web\Component\RedisMock\RedisMockFactory;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Simpleue\Queue\RedisQueue;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Import\InstapaperImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
-class InstapaperImportTest extends \PHPUnit_Framework_TestCase
+class InstapaperImportTest extends TestCase
{
protected $user;
protected $em;
use M6Web\Component\RedisMock\RedisMockFactory;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Simpleue\Queue\RedisQueue;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
-class PocketImportTest extends \PHPUnit_Framework_TestCase
+class PocketImportTest extends TestCase
{
protected $token;
protected $user;
use M6Web\Component\RedisMock\RedisMockFactory;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Simpleue\Queue\RedisQueue;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Import\ReadabilityImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
-class ReadabilityImportTest extends \PHPUnit_Framework_TestCase
+class ReadabilityImportTest extends TestCase
{
protected $user;
protected $em;
use M6Web\Component\RedisMock\RedisMockFactory;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Simpleue\Queue\RedisQueue;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Import\WallabagV1Import;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
-class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
+class WallabagV1ImportTest extends TestCase
{
protected $user;
protected $em;
use M6Web\Component\RedisMock\RedisMockFactory;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Simpleue\Queue\RedisQueue;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Import\WallabagV2Import;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
-class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
+class WallabagV2ImportTest extends TestCase
{
protected $user;
protected $em;
use Monolog\Handler\TestHandler;
use Monolog\Logger;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
use Wallabag\UserBundle\EventListener\AuthenticationFailureListener;
-class AuthenticationFailureListenerTest extends \PHPUnit_Framework_TestCase
+class AuthenticationFailureListenerTest extends TestCase
{
private $requestStack;
private $logHandler;
use FOS\UserBundle\Event\FilterUserResponseEvent;
use FOS\UserBundle\FOSUserEvents;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\EventListener\CreateConfigListener;
-class CreateConfigListenerTest extends \PHPUnit_Framework_TestCase
+class CreateConfigListenerTest extends TestCase
{
private $em;
private $listener;
namespace Tests\Wallabag\UserBundle\Mailer;
+use PHPUnit\Framework\TestCase;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Mailer\AuthCodeMailer;
}
}
-class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase
+class AuthCodeMailerTest extends TestCase
{
protected $mailer;
protected $spool;