mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-03 13:28:41 +00:00
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.
This commit is contained in:
parent
735068d181
commit
8a493541fa
11 changed files with 18 additions and 18 deletions
|
@ -51,7 +51,7 @@ before_script:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ant prepare-$DB
|
- ant prepare-$DB
|
||||||
- SYMFONY_DEPRECATIONS_HELPER=weak bin/phpunit --exclude-group command-doctrine -v
|
- SYMFONY_DEPRECATIONS_HELPER=weak bin/phpunit -v
|
||||||
|
|
||||||
# after_script:
|
# after_script:
|
||||||
# - |
|
# - |
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace Wallabag\ApiBundle\Tests\Controller;
|
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;
|
protected static $salt;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Wallabag\ApiBundle\Tests;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||||
use Symfony\Component\BrowserKit\Cookie;
|
use Symfony\Component\BrowserKit\Cookie;
|
||||||
|
|
||||||
abstract class AbstractControllerTest extends WebTestCase
|
abstract class WallabagApiTestCase extends WebTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var Client
|
* @var Client
|
|
@ -96,10 +96,10 @@ class InstallCommand extends ContainerAwareCommand
|
||||||
|
|
||||||
if (!$fulfilled) {
|
if (!$fulfilled) {
|
||||||
throw new \RuntimeException('Some system requirements are not fulfilled. Please check output messages and fix them.');
|
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('');
|
$this->defaultOutput->writeln('');
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -74,6 +74,9 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertEquals('This value should not be blank.', $alert[0]);
|
$this->assertEquals('This value should not be blank.', $alert[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This test will require an internet connection
|
||||||
|
*/
|
||||||
public function testPostNewOk()
|
public function testPostNewOk()
|
||||||
{
|
{
|
||||||
$this->logInAs('admin');
|
$this->logInAs('admin');
|
||||||
|
@ -119,6 +122,9 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testPostNewOk
|
||||||
|
*/
|
||||||
public function testView()
|
public function testView()
|
||||||
{
|
{
|
||||||
$this->logInAs('admin');
|
$this->logInAs('admin');
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\EventListener;
|
namespace Wallabag\CoreBundle\Tests\EventListener;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
|
@ -12,7 +11,7 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||||
use Symfony\Component\HttpFoundation\Session\Session;
|
use Symfony\Component\HttpFoundation\Session\Session;
|
||||||
use Wallabag\CoreBundle\EventListener\LocaleListener;
|
use Wallabag\CoreBundle\EventListener\LocaleListener;
|
||||||
|
|
||||||
class LocaleListenerTest extends KernelTestCase
|
class LocaleListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private function getEvent(Request $request)
|
private function getEvent(Request $request)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\EventListener;
|
namespace Wallabag\CoreBundle\Tests\EventListener;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
@ -12,7 +11,7 @@ use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class RegistrationConfirmedListenerTest extends KernelTestCase
|
class RegistrationConfirmedListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private $em;
|
private $em;
|
||||||
private $listener;
|
private $listener;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\EventListener;
|
namespace Wallabag\CoreBundle\Tests\EventListener;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||||
use Symfony\Component\HttpFoundation\Session\Session;
|
use Symfony\Component\HttpFoundation\Session\Session;
|
||||||
|
@ -12,7 +11,7 @@ use Wallabag\CoreBundle\EventListener\UserLocaleListener;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class UserLocaleListenerTest extends KernelTestCase
|
class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testWithLanguage()
|
public function testWithLanguage()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,12 +2,11 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\Helper;
|
namespace Wallabag\CoreBundle\Tests\Helper;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||||
|
|
||||||
class ContentProxyTest extends KernelTestCase
|
class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testWithEmptyContent()
|
public function testWithEmptyContent()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\Command;
|
namespace Wallabag\CoreBundle\Tests\Command;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
||||||
use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
|
use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class UsernameRssTokenConverterTest extends KernelTestCase
|
class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testSupportsWithNoRegistry()
|
public function testSupportsWithNoRegistry()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\Subscriber;
|
namespace Wallabag\CoreBundle\Tests\Subscriber;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
||||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||||
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
||||||
use Doctrine\Common\EventManager;
|
use Doctrine\Common\EventManager;
|
||||||
use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber;
|
use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber;
|
||||||
|
|
||||||
class TablePrefixSubscriberTest extends KernelTestCase
|
class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function dataForPrefix()
|
public function dataForPrefix()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue