Fix phpcs

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf 2017-11-19 15:26:13 +01:00
parent 65152fcb89
commit eae8138b33
5 changed files with 22 additions and 22 deletions

View file

@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* Add origin_url column * Add origin_url column.
*/ */
class Version20171105202000 extends AbstractMigration implements ContainerAwareInterface class Version20171105202000 extends AbstractMigration implements ContainerAwareInterface
{ {

View file

@ -840,7 +840,7 @@ class Entry
return $this; return $this;
} }
/** /**
* Set origin url. * Set origin url.
* *
@ -854,7 +854,7 @@ class Entry
return $this; return $this;
} }
/** /**
* Get origin url. * Get origin url.
* *

View file

@ -712,28 +712,28 @@ class EntryRestControllerTest extends WallabagApiTestCase
$this->assertSame($previousLanguage, $content['language'], 'Ensure language has not moved'); $this->assertSame($previousLanguage, $content['language'], 'Ensure language has not moved');
$this->assertSame($previousTitle, $content['title'], 'Ensure title has not moved'); $this->assertSame($previousTitle, $content['title'], 'Ensure title has not moved');
} }
public function testPatchEntryNullOriginUrl() public function testPatchEntryNullOriginUrl()
{ {
$entry = $this->client->getContainer() $entry = $this->client->getContainer()
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->findOneByUser(1); ->findOneByUser(1);
if (!$entry) { if (!$entry) {
$this->markTestSkipped('No content found in db.'); $this->markTestSkipped('No content found in db.');
} }
$this->client->request('PATCH', '/api/entries/' . $entry->getId() . '.json', [ $this->client->request('PATCH', '/api/entries/' . $entry->getId() . '.json', [
'origin_url' => null, 'origin_url' => null,
]); ]);
$this->assertSame(200, $this->client->getResponse()->getStatusCode()); $this->assertSame(200, $this->client->getResponse()->getStatusCode());
$content = json_decode($this->client->getResponse()->getContent(), true); $content = json_decode($this->client->getResponse()->getContent(), true);
$this->assertNull($content['origin_url']); $this->assertNull($content['origin_url']);
} }
public function testGetTagsEntry() public function testGetTagsEntry()
{ {

View file

@ -519,7 +519,7 @@ class EntryControllerTest extends WallabagCoreTestCase
$this->assertGreaterThan(1, $title = $crawler->filter('div[id=article] h1')->extract(['_text'])); $this->assertGreaterThan(1, $title = $crawler->filter('div[id=article] h1')->extract(['_text']));
$this->assertContains('My updated title hehe :)', $title[0]); $this->assertContains('My updated title hehe :)', $title[0]);
$this->assertSame(1, sizeof($stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text']))); $this->assertSame(1, count($stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text'])));
$this->assertNotContains('example.io', trim($stats[0])); $this->assertNotContains('example.io', trim($stats[0]));
} }

View file

@ -50,7 +50,7 @@ class WallabagExtensionTest extends \PHPUnit_Framework_TestCase
->getMock(); ->getMock();
$extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator); $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator);
$this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('www.lemonde.fr')); $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('www.lemonde.fr'));
$this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('http://lemonde.fr')); $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('http://lemonde.fr'));
$this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('https://www.lemonde.fr')); $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('https://www.lemonde.fr'));