aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/CoreBundle')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php11
-rw-r--r--tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/RssControllerTest.php2
-rw-r--r--tests/Wallabag/CoreBundle/Helper/RedirectTest.php3
-rw-r--r--tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php2
6 files changed, 12 insertions, 10 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
index cf9f1e97..c9dbbaa3 100644
--- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
@@ -1,6 +1,6 @@
1<?php 1<?php
2 2
3namespace tests\Wallabag\CoreBundle\Controller; 3namespace Tests\Wallabag\CoreBundle\Controller;
4 4
5use Tests\Wallabag\CoreBundle\WallabagCoreTestCase; 5use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
6use Wallabag\AnnotationBundle\Entity\Annotation; 6use Wallabag\AnnotationBundle\Entity\Annotation;
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index 006ca330..005296ff 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -522,9 +522,12 @@ class EntryControllerTest extends WallabagCoreTestCase
522 522
523 $crawler = $client->followRedirect(); 523 $crawler = $client->followRedirect();
524 524
525 $this->assertGreaterThan(1, $title = $crawler->filter('div[id=article] h1')->extract(['_text'])); 525 $title = $crawler->filter('div[id=article] h1')->extract(['_text']);
526 $this->assertGreaterThan(1, $title);
526 $this->assertContains('My updated title hehe :)', $title[0]); 527 $this->assertContains('My updated title hehe :)', $title[0]);
527 $this->assertSame(1, \count($stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text']))); 528
529 $stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text']);
530 $this->assertCount(1, $stats);
528 $this->assertNotContains('example.io', trim($stats[0])); 531 $this->assertNotContains('example.io', trim($stats[0]));
529 } 532 }
530 533
@@ -1327,10 +1330,6 @@ class EntryControllerTest extends WallabagCoreTestCase
1327 'http://www.hao123.com/shequ?__noscript__-=1', 1330 'http://www.hao123.com/shequ?__noscript__-=1',
1328 'zh_CN', 1331 'zh_CN',
1329 ], 1332 ],
1330 'ru' => [
1331 'https://www.kp.ru/daily/26879.7/3921982/',
1332 'ru',
1333 ],
1334 'pt_BR' => [ 1333 'pt_BR' => [
1335 'https://politica.estadao.com.br/noticias/eleicoes,campanha-catatonica,70002491983', 1334 'https://politica.estadao.com.br/noticias/eleicoes,campanha-catatonica,70002491983',
1336 'pt_BR', 1335 'pt_BR',
diff --git a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
index 0c3d4c83..d7ce7c45 100644
--- a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
@@ -180,7 +180,7 @@ class ExportControllerTest extends WallabagCoreTestCase
180 180
181 $this->assertGreaterThan(1, $csv); 181 $this->assertGreaterThan(1, $csv);
182 // +1 for title line 182 // +1 for title line
183 $this->assertSame(\count($contentInDB) + 1, \count($csv)); 183 $this->assertCount(\count($contentInDB) + 1, $csv);
184 $this->assertSame('Title;URL;Content;Tags;"MIME Type";Language;"Creation date"', $csv[0]); 184 $this->assertSame('Title;URL;Content;Tags;"MIME Type";Language;"Creation date"', $csv[0]);
185 $this->assertContains($contentInDB[0]['title'], $csv[1]); 185 $this->assertContains($contentInDB[0]['title'], $csv[1]);
186 $this->assertContains($contentInDB[0]['url'], $csv[1]); 186 $this->assertContains($contentInDB[0]['url'], $csv[1]);
diff --git a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
index 2af6e14f..afa90621 100644
--- a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
@@ -11,7 +11,7 @@ class RssControllerTest extends WallabagCoreTestCase
11 $doc = new \DOMDocument(); 11 $doc = new \DOMDocument();
12 $doc->loadXML($xml); 12 $doc->loadXML($xml);
13 13
14 $xpath = new \DOMXpath($doc); 14 $xpath = new \DOMXPath($doc);
15 15
16 if (null === $nb) { 16 if (null === $nb) {
17 $this->assertGreaterThan(0, $xpath->query('//item')->length); 17 $this->assertGreaterThan(0, $xpath->query('//item')->length);
diff --git a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
index 04e1a59c..29e12cbe 100644
--- a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
@@ -17,6 +17,9 @@ class RedirectTest extends TestCase
17 /** @var Redirect */ 17 /** @var Redirect */
18 private $redirect; 18 private $redirect;
19 19
20 /** @var UsernamePasswordToken */
21 private $token;
22
20 public function setUp() 23 public function setUp()
21 { 24 {
22 $this->routerMock = $this->getMockBuilder('Symfony\Component\Routing\Router') 25 $this->routerMock = $this->getMockBuilder('Symfony\Component\Routing\Router')
diff --git a/tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php b/tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php
index b044a700..800af5c9 100644
--- a/tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php
+++ b/tests/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverterTest.php
@@ -1,6 +1,6 @@
1<?php 1<?php
2 2
3namespace Tests\Wallabag\CoreBundle\Command; 3namespace Tests\Wallabag\CoreBundle\ParamConverter;
4 4
5use PHPUnit\Framework\TestCase; 5use PHPUnit\Framework\TestCase;
6use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; 6use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;