aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2017-11-19 15:26:13 +0100
committerKevin Decherf <kevin@kdecherf.com>2017-11-19 15:26:13 +0100
commiteae8138b33e4ed4a5d1a98daf77941ef691629de (patch)
tree1f42a4b00000f16292ec76acae406edcc13c75cd
parent65152fcb899e1d073847718e2f7847180fa26a40 (diff)
downloadwallabag-eae8138b33e4ed4a5d1a98daf77941ef691629de.tar.gz
wallabag-eae8138b33e4ed4a5d1a98daf77941ef691629de.tar.zst
wallabag-eae8138b33e4ed4a5d1a98daf77941ef691629de.zip
Fix phpcs
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
-rw-r--r--app/DoctrineMigrations/Version20171105202000.php2
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php4
-rw-r--r--tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php34
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php2
-rw-r--r--tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php2
5 files changed, 22 insertions, 22 deletions
diff --git a/app/DoctrineMigrations/Version20171105202000.php b/app/DoctrineMigrations/Version20171105202000.php
index b1cff9ce..3769045f 100644
--- a/app/DoctrineMigrations/Version20171105202000.php
+++ b/app/DoctrineMigrations/Version20171105202000.php
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface; 8use Symfony\Component\DependencyInjection\ContainerInterface;
9 9
10/** 10/**
11 * Add origin_url column 11 * Add origin_url column.
12 */ 12 */
13class Version20171105202000 extends AbstractMigration implements ContainerAwareInterface 13class Version20171105202000 extends AbstractMigration implements ContainerAwareInterface
14{ 14{
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index 445cc45e..2b1f2e05 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -840,7 +840,7 @@ class Entry
840 840
841 return $this; 841 return $this;
842 } 842 }
843 843
844 /** 844 /**
845 * Set origin url. 845 * Set origin url.
846 * 846 *
@@ -854,7 +854,7 @@ class Entry
854 854
855 return $this; 855 return $this;
856 } 856 }
857 857
858 /** 858 /**
859 * Get origin url. 859 * Get origin url.
860 * 860 *
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
index 8f0effee..65a3ccd9 100644
--- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
+++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
@@ -712,28 +712,28 @@ class EntryRestControllerTest extends WallabagApiTestCase
712 $this->assertSame($previousLanguage, $content['language'], 'Ensure language has not moved'); 712 $this->assertSame($previousLanguage, $content['language'], 'Ensure language has not moved');
713 $this->assertSame($previousTitle, $content['title'], 'Ensure title has not moved'); 713 $this->assertSame($previousTitle, $content['title'], 'Ensure title has not moved');
714 } 714 }
715 715
716 public function testPatchEntryNullOriginUrl() 716 public function testPatchEntryNullOriginUrl()
717 { 717 {
718 $entry = $this->client->getContainer() 718 $entry = $this->client->getContainer()
719 ->get('doctrine.orm.entity_manager') 719 ->get('doctrine.orm.entity_manager')
720 ->getRepository('WallabagCoreBundle:Entry') 720 ->getRepository('WallabagCoreBundle:Entry')
721 ->findOneByUser(1); 721 ->findOneByUser(1);
722 722
723 if (!$entry) { 723 if (!$entry) {
724 $this->markTestSkipped('No content found in db.'); 724 $this->markTestSkipped('No content found in db.');
725 } 725 }
726 726
727 $this->client->request('PATCH', '/api/entries/' . $entry->getId() . '.json', [ 727 $this->client->request('PATCH', '/api/entries/' . $entry->getId() . '.json', [
728 'origin_url' => null, 728 'origin_url' => null,
729 ]); 729 ]);
730 730
731 $this->assertSame(200, $this->client->getResponse()->getStatusCode()); 731 $this->assertSame(200, $this->client->getResponse()->getStatusCode());
732 732
733 $content = json_decode($this->client->getResponse()->getContent(), true); 733 $content = json_decode($this->client->getResponse()->getContent(), true);
734 734
735 $this->assertNull($content['origin_url']); 735 $this->assertNull($content['origin_url']);
736 } 736 }
737 737
738 public function testGetTagsEntry() 738 public function testGetTagsEntry()
739 { 739 {
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index e2fb8d78..c6a523e3 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -519,7 +519,7 @@ class EntryControllerTest extends WallabagCoreTestCase
519 519
520 $this->assertGreaterThan(1, $title = $crawler->filter('div[id=article] h1')->extract(['_text'])); 520 $this->assertGreaterThan(1, $title = $crawler->filter('div[id=article] h1')->extract(['_text']));
521 $this->assertContains('My updated title hehe :)', $title[0]); 521 $this->assertContains('My updated title hehe :)', $title[0]);
522 $this->assertSame(1, sizeof($stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text']))); 522 $this->assertSame(1, count($stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text'])));
523 $this->assertNotContains('example.io', trim($stats[0])); 523 $this->assertNotContains('example.io', trim($stats[0]));
524 } 524 }
525 525
diff --git a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
index 27989346..82336060 100644
--- a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
+++ b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
@@ -50,7 +50,7 @@ class WallabagExtensionTest extends \PHPUnit_Framework_TestCase
50 ->getMock(); 50 ->getMock();
51 51
52 $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator); 52 $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator);
53 53
54 $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('www.lemonde.fr')); 54 $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('www.lemonde.fr'));
55 $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('http://lemonde.fr')); 55 $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('http://lemonde.fr'));
56 $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('https://www.lemonde.fr')); 56 $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('https://www.lemonde.fr'));