From bd91bd5c32dcec997e1cc1aff93f585dac093742 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 16 Dec 2017 22:17:42 +0100 Subject: Use namespaced PHPUnit classes --- tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php | 3 ++- tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/ChromeImportTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/ImportChainTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/ImportCompilerPassTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/PocketImportTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php | 3 ++- tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php | 3 ++- 11 files changed, 22 insertions(+), 11 deletions(-) (limited to 'tests/Wallabag/ImportBundle') 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 @@ 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() { 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 @@ 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() { 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; 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; 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; 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; 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 @@ 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() { 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 @@ 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() { 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; 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; 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; 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; @@ -16,7 +17,7 @@ use Wallabag\ImportBundle\Import\PocketImport; use Wallabag\ImportBundle\Redis\Producer; use Wallabag\UserBundle\Entity\User; -class PocketImportTest extends \PHPUnit_Framework_TestCase +class PocketImportTest extends TestCase { protected $token; 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; 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; 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; 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; 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; 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; -- cgit v1.2.3 From acc0a801798d624cfab44ea04769a46dfa54b49b Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 18 Dec 2017 10:29:42 +0100 Subject: Add missing assertion in tests --- tests/Wallabag/ImportBundle/Command/ImportCommandTest.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/Wallabag/ImportBundle') 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 '--useUserId' => true, '--importer' => 'v2', ]); + + $this->assertContains('imported', $tester->getDisplay()); + $this->assertContains('already saved', $tester->getDisplay()); } } -- cgit v1.2.3