mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
tests: add a NetworkCalls group for tests making network calls
Excluding this group can decrease the run time of tests during development. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
25c754f62f
commit
71f7e58fbd
3 changed files with 30 additions and 5 deletions
|
@ -45,6 +45,9 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
|
||||||
$this->getEntityManager()->flush();
|
$this->getEntityManager()->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group NetworkCalls
|
||||||
|
*/
|
||||||
public function testRunReloadEntryCommand()
|
public function testRunReloadEntryCommand()
|
||||||
{
|
{
|
||||||
$application = new Application($this->getClient()->getKernel());
|
$application = new Application($this->getClient()->getKernel());
|
||||||
|
@ -70,6 +73,9 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
|
||||||
$this->assertContains('Done', $tester->getDisplay());
|
$this->assertContains('Done', $tester->getDisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group NetworkCalls
|
||||||
|
*/
|
||||||
public function testRunReloadEntryWithUsernameCommand()
|
public function testRunReloadEntryWithUsernameCommand()
|
||||||
{
|
{
|
||||||
$application = new Application($this->getClient()->getKernel());
|
$application = new Application($this->getClient()->getKernel());
|
||||||
|
|
|
@ -812,6 +812,9 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||||
$em->flush();
|
$em->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group NetworkCalls
|
||||||
|
*/
|
||||||
public function testDeleteAccount()
|
public function testDeleteAccount()
|
||||||
{
|
{
|
||||||
$client = $this->getClient();
|
$client = $this->getClient();
|
||||||
|
|
|
@ -40,6 +40,9 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertContains('login', $client->getResponse()->headers->get('location'));
|
$this->assertContains('login', $client->getResponse()->headers->get('location'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group NetworkCalls
|
||||||
|
*/
|
||||||
public function testQuickstart()
|
public function testQuickstart()
|
||||||
{
|
{
|
||||||
$this->logInAs('empty');
|
$this->logInAs('empty');
|
||||||
|
@ -87,6 +90,9 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertCount(1, $crawler->filter('form[name=entry]'));
|
$this->assertCount(1, $crawler->filter('form[name=entry]'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group NetworkCalls
|
||||||
|
*/
|
||||||
public function testPostNewViaBookmarklet()
|
public function testPostNewViaBookmarklet()
|
||||||
{
|
{
|
||||||
$this->logInAs('admin');
|
$this->logInAs('admin');
|
||||||
|
@ -131,7 +137,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test will require an internet connection.
|
* @group NetworkCalls
|
||||||
*/
|
*/
|
||||||
public function testPostNewOk()
|
public function testPostNewOk()
|
||||||
{
|
{
|
||||||
|
@ -169,6 +175,9 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$client->getContainer()->get('craue_config')->set('store_article_headers', 0);
|
$client->getContainer()->get('craue_config')->set('store_article_headers', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group NetworkCalls
|
||||||
|
*/
|
||||||
public function testPostWithMultipleAuthors()
|
public function testPostWithMultipleAuthors()
|
||||||
{
|
{
|
||||||
$url = 'https://www.liberation.fr/planete/2017/04/05/donald-trump-et-xi-jinping-tentative-de-flirt-en-floride_1560768';
|
$url = 'https://www.liberation.fr/planete/2017/04/05/donald-trump-et-xi-jinping-tentative-de-flirt-en-floride_1560768';
|
||||||
|
@ -229,6 +238,9 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertContains('/view/', $client->getResponse()->getTargetUrl());
|
$this->assertContains('/view/', $client->getResponse()->getTargetUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group NetworkCalls
|
||||||
|
*/
|
||||||
public function testPostNewOkUrlExistWithAccent()
|
public function testPostNewOkUrlExistWithAccent()
|
||||||
{
|
{
|
||||||
$this->logInAs('admin');
|
$this->logInAs('admin');
|
||||||
|
@ -265,7 +277,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test will require an internet connection.
|
* @group NetworkCalls
|
||||||
*/
|
*/
|
||||||
public function testPostNewOkUrlExistWithRedirection()
|
public function testPostNewOkUrlExistWithRedirection()
|
||||||
{
|
{
|
||||||
|
@ -303,7 +315,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test will require an internet connection.
|
* @group NetworkCalls
|
||||||
*/
|
*/
|
||||||
public function testPostNewThatWillBeTagged()
|
public function testPostNewThatWillBeTagged()
|
||||||
{
|
{
|
||||||
|
@ -430,7 +442,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test will require an internet connection.
|
* @group NetworkCalls
|
||||||
*/
|
*/
|
||||||
public function testReload()
|
public function testReload()
|
||||||
{
|
{
|
||||||
|
@ -1056,6 +1068,9 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group NetworkCalls
|
||||||
|
*/
|
||||||
public function testNewEntryWithDownloadImagesEnabled()
|
public function testNewEntryWithDownloadImagesEnabled()
|
||||||
{
|
{
|
||||||
$this->downloadImagesEnabled = true;
|
$this->downloadImagesEnabled = true;
|
||||||
|
@ -1383,6 +1398,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider dataForLanguage
|
* @dataProvider dataForLanguage
|
||||||
|
* @group NetworkCalls
|
||||||
*/
|
*/
|
||||||
public function testLanguageValidation($url, $expectedLanguage)
|
public function testLanguageValidation($url, $expectedLanguage)
|
||||||
{
|
{
|
||||||
|
@ -1414,7 +1430,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test will require an internet connection.
|
* @group NetworkCalls
|
||||||
*/
|
*/
|
||||||
public function testRestrictedArticle()
|
public function testRestrictedArticle()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue