diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-11-01 23:42:52 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-11-07 14:16:13 +0100 |
commit | 8a493541fa4911233fe9186e88371d17cb9fd7db (patch) | |
tree | cd4011716fbf85b29b54d33e0ca17920cb5fe6d4 | |
parent | 735068d1814a4b7a688e1d19cd17b13e8c5da3eb (diff) | |
download | wallabag-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.yml | 2 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php | 4 | ||||
-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.php | 4 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php | 6 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php | 3 |
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 | ||
52 | script: | 52 | script: |
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 | ||
3 | namespace Wallabag\ApiBundle\Tests\Controller; | 3 | namespace Wallabag\ApiBundle\Tests\Controller; |
4 | 4 | ||
5 | use Wallabag\ApiBundle\Tests\AbstractControllerTest; | 5 | use Wallabag\ApiBundle\Tests\WallabagApiTestCase; |
6 | 6 | ||
7 | class WallabagRestControllerTest extends AbstractControllerTest | 7 | class 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; | |||
5 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | 5 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; |
6 | use Symfony\Component\BrowserKit\Cookie; | 6 | use Symfony\Component\BrowserKit\Cookie; |
7 | 7 | ||
8 | abstract class AbstractControllerTest extends WebTestCase | 8 | abstract 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 | ||
3 | namespace Wallabag\CoreBundle\Tests\EventListener; | 3 | namespace Wallabag\CoreBundle\Tests\EventListener; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
6 | use Symfony\Component\EventDispatcher\EventDispatcher; | 5 | use Symfony\Component\EventDispatcher\EventDispatcher; |
7 | use Symfony\Component\HttpFoundation\Request; | 6 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpKernel\KernelEvents; | 7 | use Symfony\Component\HttpKernel\KernelEvents; |
@@ -12,7 +11,7 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; | |||
12 | use Symfony\Component\HttpFoundation\Session\Session; | 11 | use Symfony\Component\HttpFoundation\Session\Session; |
13 | use Wallabag\CoreBundle\EventListener\LocaleListener; | 12 | use Wallabag\CoreBundle\EventListener\LocaleListener; |
14 | 13 | ||
15 | class LocaleListenerTest extends KernelTestCase | 14 | class 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 | ||
3 | namespace Wallabag\CoreBundle\Tests\EventListener; | 3 | namespace Wallabag\CoreBundle\Tests\EventListener; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
6 | use Symfony\Component\EventDispatcher\EventDispatcher; | 5 | use Symfony\Component\EventDispatcher\EventDispatcher; |
7 | use Symfony\Component\HttpFoundation\Request; | 6 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpFoundation\Response; | 7 | use Symfony\Component\HttpFoundation\Response; |
@@ -12,7 +11,7 @@ use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener; | |||
12 | use Wallabag\CoreBundle\Entity\Config; | 11 | use Wallabag\CoreBundle\Entity\Config; |
13 | use Wallabag\UserBundle\Entity\User; | 12 | use Wallabag\UserBundle\Entity\User; |
14 | 13 | ||
15 | class RegistrationConfirmedListenerTest extends KernelTestCase | 14 | class 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 | ||
3 | namespace Wallabag\CoreBundle\Tests\EventListener; | 3 | namespace Wallabag\CoreBundle\Tests\EventListener; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
6 | use Symfony\Component\HttpFoundation\Request; | 5 | use Symfony\Component\HttpFoundation\Request; |
7 | use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; | 6 | use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; |
8 | use Symfony\Component\HttpFoundation\Session\Session; | 7 | use Symfony\Component\HttpFoundation\Session\Session; |
@@ -12,7 +11,7 @@ use Wallabag\CoreBundle\EventListener\UserLocaleListener; | |||
12 | use Wallabag\CoreBundle\Entity\Config; | 11 | use Wallabag\CoreBundle\Entity\Config; |
13 | use Wallabag\UserBundle\Entity\User; | 12 | use Wallabag\UserBundle\Entity\User; |
14 | 13 | ||
15 | class UserLocaleListenerTest extends KernelTestCase | 14 | class 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 | ||
3 | namespace Wallabag\CoreBundle\Tests\Helper; | 3 | namespace Wallabag\CoreBundle\Tests\Helper; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
6 | use Wallabag\CoreBundle\Entity\Entry; | 5 | use Wallabag\CoreBundle\Entity\Entry; |
7 | use Wallabag\UserBundle\Entity\User; | 6 | use Wallabag\UserBundle\Entity\User; |
8 | use Wallabag\CoreBundle\Helper\ContentProxy; | 7 | use Wallabag\CoreBundle\Helper\ContentProxy; |
9 | 8 | ||
10 | class ContentProxyTest extends KernelTestCase | 9 | class 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 | ||
3 | namespace Wallabag\CoreBundle\Tests\Command; | 3 | namespace Wallabag\CoreBundle\Tests\Command; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
6 | use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter; | 5 | use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter; |
7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
8 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
9 | use Wallabag\UserBundle\Entity\User; | 8 | use Wallabag\UserBundle\Entity\User; |
10 | 9 | ||
11 | class UsernameRssTokenConverterTest extends KernelTestCase | 10 | class 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 | ||
3 | namespace Wallabag\CoreBundle\Tests\Subscriber; | 3 | namespace Wallabag\CoreBundle\Tests\Subscriber; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
6 | use Doctrine\ORM\Mapping\ClassMetadata; | 5 | use Doctrine\ORM\Mapping\ClassMetadata; |
7 | use Doctrine\ORM\Event\LoadClassMetadataEventArgs; | 6 | use Doctrine\ORM\Event\LoadClassMetadataEventArgs; |
8 | use Doctrine\Common\EventManager; | 7 | use Doctrine\Common\EventManager; |
9 | use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber; | 8 | use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber; |
10 | 9 | ||
11 | class TablePrefixSubscriberTest extends KernelTestCase | 10 | class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase |
12 | { | 11 | { |
13 | public function dataForPrefix() | 12 | public function dataForPrefix() |
14 | { | 13 | { |