]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Re-enable test on doctrine command
authorJeremy Benoist <jeremy.benoist@gmail.com>
Sun, 1 Nov 2015 22:42:52 +0000 (23:42 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Sat, 7 Nov 2015 13:16:13 +0000 (14:16 +0100)
It will slow down the whole test suite (because it'll use doctrine command).
Remove unecessary `KernelTestCase`.
Also rename `AbstractControllerTest` to `WallabagApiTestCase` for consistency.

.travis.yml
src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php [moved from src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php with 96% similarity]
src/Wallabag/CoreBundle/Command/InstallCommand.php
src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php
src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php
src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php
src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php
src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php
src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php

index df3a5c7255654f69eba1a1ead9d669fee3c5c575..9a19be6174dd195894dad5de4f120b0a4cfcb4a5 100644 (file)
@@ -51,7 +51,7 @@ before_script:
 
 script:
     - ant prepare-$DB
-    - SYMFONY_DEPRECATIONS_HELPER=weak bin/phpunit --exclude-group command-doctrine -v
+    - SYMFONY_DEPRECATIONS_HELPER=weak bin/phpunit -v
 
 # after_script:
     # - |
index bc7ef4895a9fb8dbb81b76b0fe9619a474088138..bdd36e0c6b3fb20063480f87b17b24ea2ed6afd3 100644 (file)
@@ -2,9 +2,9 @@
 
 namespace Wallabag\ApiBundle\Tests\Controller;
 
-use Wallabag\ApiBundle\Tests\AbstractControllerTest;
+use Wallabag\ApiBundle\Tests\WallabagApiTestCase;
 
-class WallabagRestControllerTest extends AbstractControllerTest
+class WallabagRestControllerTest extends WallabagApiTestCase
 {
     protected static $salt;
 
similarity index 96%
rename from src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php
rename to src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php
index 09cde0f602766995b7c48b02a0e85c121390fa40..8a57fea2639ade40dd5d7cc88a963824cb6a73d1 100644 (file)
@@ -5,7 +5,7 @@ namespace Wallabag\ApiBundle\Tests;
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
 use Symfony\Component\BrowserKit\Cookie;
 
-abstract class AbstractControllerTest extends WebTestCase
+abstract class WallabagApiTestCase extends WebTestCase
 {
     /**
      * @var Client
index 865a73e1db215c56fd137757d4d8643e8a6df507..8b702c958b1cea05a44a318f7525aa7e0dd3ee38 100644 (file)
@@ -96,10 +96,10 @@ class InstallCommand extends ContainerAwareCommand
 
         if (!$fulfilled) {
             throw new \RuntimeException('Some system requirements are not fulfilled. Please check output messages and fix them.');
-        } else {
-            $this->defaultOutput->writeln('<info>Success! Your system can run Wallabag properly.</info>');
         }
 
+        $this->defaultOutput->writeln('<info>Success! Your system can run Wallabag properly.</info>');
+
         $this->defaultOutput->writeln('');
 
         return $this;
index 5ac39d1212276a210ba3b6471d6ee815aa41ff26..0bd7d4fe66de9d09076b0842a9bbc783c9a27d77 100644 (file)
@@ -74,6 +74,9 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->assertEquals('This value should not be blank.', $alert[0]);
     }
 
+    /**
+     * This test will require an internet connection
+     */
     public function testPostNewOk()
     {
         $this->logInAs('admin');
@@ -119,6 +122,9 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
     }
 
+    /**
+     * @depends testPostNewOk
+     */
     public function testView()
     {
         $this->logInAs('admin');
index 356a411e6fd3eb9af8da64b7cce3accb76bf0447..d89bee0471129acb874f20cbc2e710471dfe3632 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Wallabag\CoreBundle\Tests\EventListener;
 
-use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
 use Symfony\Component\EventDispatcher\EventDispatcher;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\KernelEvents;
@@ -12,7 +11,7 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
 use Symfony\Component\HttpFoundation\Session\Session;
 use Wallabag\CoreBundle\EventListener\LocaleListener;
 
-class LocaleListenerTest extends KernelTestCase
+class LocaleListenerTest extends \PHPUnit_Framework_TestCase
 {
     private function getEvent(Request $request)
     {
index df94fad25066d36b78ebe00d9ba3254259be773e..31283399d33715a2fb80f922750d11aa77ccb14f 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Wallabag\CoreBundle\Tests\EventListener;
 
-use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
 use Symfony\Component\EventDispatcher\EventDispatcher;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
@@ -12,7 +11,7 @@ use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener;
 use Wallabag\CoreBundle\Entity\Config;
 use Wallabag\UserBundle\Entity\User;
 
-class RegistrationConfirmedListenerTest extends KernelTestCase
+class RegistrationConfirmedListenerTest extends \PHPUnit_Framework_TestCase
 {
     private $em;
     private $listener;
index e8a65fbf17251500a550b6e20682c95737b68442..80ddb4572db64aa9ed7a427c52c0bd36273516c3 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Wallabag\CoreBundle\Tests\EventListener;
 
-use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
 use Symfony\Component\HttpFoundation\Session\Session;
@@ -12,7 +11,7 @@ use Wallabag\CoreBundle\EventListener\UserLocaleListener;
 use Wallabag\CoreBundle\Entity\Config;
 use Wallabag\UserBundle\Entity\User;
 
-class UserLocaleListenerTest extends KernelTestCase
+class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase
 {
     public function testWithLanguage()
     {
index 1d0d40628deef126cba9553e1bd069d3a2e88c6b..4bce4708f2ae1e42adeb50119dc63057eb4e8de4 100644 (file)
@@ -2,12 +2,11 @@
 
 namespace Wallabag\CoreBundle\Tests\Helper;
 
-use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\UserBundle\Entity\User;
 use Wallabag\CoreBundle\Helper\ContentProxy;
 
-class ContentProxyTest extends KernelTestCase
+class ContentProxyTest extends \PHPUnit_Framework_TestCase
 {
     public function testWithEmptyContent()
     {
index e28dc4bae527a7c724d2f1b89715ecd367bc9504..1c9a4ad7c4603f5942d7cdad995fcef257a4e670 100644 (file)
@@ -2,13 +2,12 @@
 
 namespace Wallabag\CoreBundle\Tests\Command;
 
-use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
 use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
 use Symfony\Component\HttpFoundation\Request;
 use Wallabag\UserBundle\Entity\User;
 
-class UsernameRssTokenConverterTest extends KernelTestCase
+class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase
 {
     public function testSupportsWithNoRegistry()
     {
index 4c138610965244563ee35185baf211341b12ed6a..a26ff43682adc4a95ad7d15b6947578c76112c31 100644 (file)
@@ -2,13 +2,12 @@
 
 namespace Wallabag\CoreBundle\Tests\Subscriber;
 
-use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
 use Doctrine\ORM\Mapping\ClassMetadata;
 use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
 use Doctrine\Common\EventManager;
 use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber;
 
-class TablePrefixSubscriberTest extends KernelTestCase
+class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase
 {
     public function dataForPrefix()
     {