aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-11-01 23:42:52 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-11-07 14:16:13 +0100
commit8a493541fa4911233fe9186e88371d17cb9fd7db (patch)
treecd4011716fbf85b29b54d33e0ca17920cb5fe6d4
parent735068d1814a4b7a688e1d19cd17b13e8c5da3eb (diff)
downloadwallabag-8a493541fa4911233fe9186e88371d17cb9fd7db.tar.gz
wallabag-8a493541fa4911233fe9186e88371d17cb9fd7db.tar.zst
wallabag-8a493541fa4911233fe9186e88371d17cb9fd7db.zip
Re-enable test on doctrine command
It will slow down the whole test suite (because it'll use doctrine command). Remove unecessary `KernelTestCase`. Also rename `AbstractControllerTest` to `WallabagApiTestCase` for consistency.
-rw-r--r--.travis.yml2
-rw-r--r--src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php4
-rw-r--r--src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php (renamed from src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php)2
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php4
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php6
-rw-r--r--src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php3
-rw-r--r--src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php3
-rw-r--r--src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php3
-rw-r--r--src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php3
-rw-r--r--src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php3
-rw-r--r--src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php3
11 files changed, 18 insertions, 18 deletions
diff --git a/.travis.yml b/.travis.yml
index df3a5c72..9a19be61 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -51,7 +51,7 @@ before_script:
51 51
52script: 52script:
53 - ant prepare-$DB 53 - ant prepare-$DB
54 - SYMFONY_DEPRECATIONS_HELPER=weak bin/phpunit --exclude-group command-doctrine -v 54 - SYMFONY_DEPRECATIONS_HELPER=weak bin/phpunit -v
55 55
56# after_script: 56# after_script:
57 # - | 57 # - |
diff --git a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
index bc7ef489..bdd36e0c 100644
--- a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
+++ b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
@@ -2,9 +2,9 @@
2 2
3namespace Wallabag\ApiBundle\Tests\Controller; 3namespace Wallabag\ApiBundle\Tests\Controller;
4 4
5use Wallabag\ApiBundle\Tests\AbstractControllerTest; 5use Wallabag\ApiBundle\Tests\WallabagApiTestCase;
6 6
7class WallabagRestControllerTest extends AbstractControllerTest 7class WallabagRestControllerTest extends WallabagApiTestCase
8{ 8{
9 protected static $salt; 9 protected static $salt;
10 10
diff --git a/src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php b/src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php
index 09cde0f6..8a57fea2 100644
--- a/src/Wallabag/ApiBundle/Tests/AbstractControllerTest.php
+++ b/src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php
@@ -5,7 +5,7 @@ namespace Wallabag\ApiBundle\Tests;
5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; 5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6use Symfony\Component\BrowserKit\Cookie; 6use Symfony\Component\BrowserKit\Cookie;
7 7
8abstract class AbstractControllerTest extends WebTestCase 8abstract class WallabagApiTestCase extends WebTestCase
9{ 9{
10 /** 10 /**
11 * @var Client 11 * @var Client
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 865a73e1..8b702c95 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -96,10 +96,10 @@ class InstallCommand extends ContainerAwareCommand
96 96
97 if (!$fulfilled) { 97 if (!$fulfilled) {
98 throw new \RuntimeException('Some system requirements are not fulfilled. Please check output messages and fix them.'); 98 throw new \RuntimeException('Some system requirements are not fulfilled. Please check output messages and fix them.');
99 } else {
100 $this->defaultOutput->writeln('<info>Success! Your system can run Wallabag properly.</info>');
101 } 99 }
102 100
101 $this->defaultOutput->writeln('<info>Success! Your system can run Wallabag properly.</info>');
102
103 $this->defaultOutput->writeln(''); 103 $this->defaultOutput->writeln('');
104 104
105 return $this; 105 return $this;
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index 5ac39d12..0bd7d4fe 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -74,6 +74,9 @@ class EntryControllerTest extends WallabagCoreTestCase
74 $this->assertEquals('This value should not be blank.', $alert[0]); 74 $this->assertEquals('This value should not be blank.', $alert[0]);
75 } 75 }
76 76
77 /**
78 * This test will require an internet connection
79 */
77 public function testPostNewOk() 80 public function testPostNewOk()
78 { 81 {
79 $this->logInAs('admin'); 82 $this->logInAs('admin');
@@ -119,6 +122,9 @@ class EntryControllerTest extends WallabagCoreTestCase
119 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 122 $this->assertEquals(200, $client->getResponse()->getStatusCode());
120 } 123 }
121 124
125 /**
126 * @depends testPostNewOk
127 */
122 public function testView() 128 public function testView()
123 { 129 {
124 $this->logInAs('admin'); 130 $this->logInAs('admin');
diff --git a/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php b/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php
index 356a411e..d89bee04 100644
--- a/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php
@@ -2,7 +2,6 @@
2 2
3namespace Wallabag\CoreBundle\Tests\EventListener; 3namespace Wallabag\CoreBundle\Tests\EventListener;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6use Symfony\Component\EventDispatcher\EventDispatcher; 5use Symfony\Component\EventDispatcher\EventDispatcher;
7use Symfony\Component\HttpFoundation\Request; 6use Symfony\Component\HttpFoundation\Request;
8use Symfony\Component\HttpKernel\KernelEvents; 7use Symfony\Component\HttpKernel\KernelEvents;
@@ -12,7 +11,7 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
12use Symfony\Component\HttpFoundation\Session\Session; 11use Symfony\Component\HttpFoundation\Session\Session;
13use Wallabag\CoreBundle\EventListener\LocaleListener; 12use Wallabag\CoreBundle\EventListener\LocaleListener;
14 13
15class LocaleListenerTest extends KernelTestCase 14class LocaleListenerTest extends \PHPUnit_Framework_TestCase
16{ 15{
17 private function getEvent(Request $request) 16 private function getEvent(Request $request)
18 { 17 {
diff --git a/src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php b/src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php
index df94fad2..31283399 100644
--- a/src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php
@@ -2,7 +2,6 @@
2 2
3namespace Wallabag\CoreBundle\Tests\EventListener; 3namespace Wallabag\CoreBundle\Tests\EventListener;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6use Symfony\Component\EventDispatcher\EventDispatcher; 5use Symfony\Component\EventDispatcher\EventDispatcher;
7use Symfony\Component\HttpFoundation\Request; 6use Symfony\Component\HttpFoundation\Request;
8use Symfony\Component\HttpFoundation\Response; 7use Symfony\Component\HttpFoundation\Response;
@@ -12,7 +11,7 @@ use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener;
12use Wallabag\CoreBundle\Entity\Config; 11use Wallabag\CoreBundle\Entity\Config;
13use Wallabag\UserBundle\Entity\User; 12use Wallabag\UserBundle\Entity\User;
14 13
15class RegistrationConfirmedListenerTest extends KernelTestCase 14class RegistrationConfirmedListenerTest extends \PHPUnit_Framework_TestCase
16{ 15{
17 private $em; 16 private $em;
18 private $listener; 17 private $listener;
diff --git a/src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php b/src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php
index e8a65fbf..80ddb457 100644
--- a/src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php
@@ -2,7 +2,6 @@
2 2
3namespace Wallabag\CoreBundle\Tests\EventListener; 3namespace Wallabag\CoreBundle\Tests\EventListener;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6use Symfony\Component\HttpFoundation\Request; 5use Symfony\Component\HttpFoundation\Request;
7use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; 6use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
8use Symfony\Component\HttpFoundation\Session\Session; 7use Symfony\Component\HttpFoundation\Session\Session;
@@ -12,7 +11,7 @@ use Wallabag\CoreBundle\EventListener\UserLocaleListener;
12use Wallabag\CoreBundle\Entity\Config; 11use Wallabag\CoreBundle\Entity\Config;
13use Wallabag\UserBundle\Entity\User; 12use Wallabag\UserBundle\Entity\User;
14 13
15class UserLocaleListenerTest extends KernelTestCase 14class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase
16{ 15{
17 public function testWithLanguage() 16 public function testWithLanguage()
18 { 17 {
diff --git a/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php b/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php
index 1d0d4062..4bce4708 100644
--- a/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php
@@ -2,12 +2,11 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Helper; 3namespace Wallabag\CoreBundle\Tests\Helper;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6use Wallabag\CoreBundle\Entity\Entry; 5use Wallabag\CoreBundle\Entity\Entry;
7use Wallabag\UserBundle\Entity\User; 6use Wallabag\UserBundle\Entity\User;
8use Wallabag\CoreBundle\Helper\ContentProxy; 7use Wallabag\CoreBundle\Helper\ContentProxy;
9 8
10class ContentProxyTest extends KernelTestCase 9class ContentProxyTest extends \PHPUnit_Framework_TestCase
11{ 10{
12 public function testWithEmptyContent() 11 public function testWithEmptyContent()
13 { 12 {
diff --git a/src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php b/src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php
index e28dc4ba..1c9a4ad7 100644
--- a/src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php
+++ b/src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php
@@ -2,13 +2,12 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Command; 3namespace Wallabag\CoreBundle\Tests\Command;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter; 5use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
7use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; 6use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
8use Symfony\Component\HttpFoundation\Request; 7use Symfony\Component\HttpFoundation\Request;
9use Wallabag\UserBundle\Entity\User; 8use Wallabag\UserBundle\Entity\User;
10 9
11class UsernameRssTokenConverterTest extends KernelTestCase 10class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase
12{ 11{
13 public function testSupportsWithNoRegistry() 12 public function testSupportsWithNoRegistry()
14 { 13 {
diff --git a/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php b/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php
index 4c138610..a26ff436 100644
--- a/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php
@@ -2,13 +2,12 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Subscriber; 3namespace Wallabag\CoreBundle\Tests\Subscriber;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6use Doctrine\ORM\Mapping\ClassMetadata; 5use Doctrine\ORM\Mapping\ClassMetadata;
7use Doctrine\ORM\Event\LoadClassMetadataEventArgs; 6use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
8use Doctrine\Common\EventManager; 7use Doctrine\Common\EventManager;
9use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber; 8use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber;
10 9
11class TablePrefixSubscriberTest extends KernelTestCase 10class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase
12{ 11{
13 public function dataForPrefix() 12 public function dataForPrefix()
14 { 13 {