aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ImportBundle/Tests')
-rw-r--r--src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php18
-rw-r--r--src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php12
-rw-r--r--src/Wallabag/ImportBundle/Tests/Import/ImportCompilerPassTest.php2
-rw-r--r--src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php2
-rw-r--r--src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php2
-rw-r--r--src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php2
6 files changed, 19 insertions, 19 deletions
diff --git a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php
index 8d353a71..f7de3fef 100644
--- a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php
+++ b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php
@@ -29,9 +29,9 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
29 29
30 $file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v1.json', 'wallabag-v1.json'); 30 $file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v1.json', 'wallabag-v1.json');
31 31
32 $data = array( 32 $data = [
33 'upload_import_file[file]' => $file, 33 'upload_import_file[file]' => $file,
34 ); 34 ];
35 35
36 $client->submit($form, $data); 36 $client->submit($form, $data);
37 37
@@ -54,7 +54,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
54 54
55 $this->assertTrue($content->getTags()->contains($tag)); 55 $this->assertTrue($content->getTags()->contains($tag));
56 56
57 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); 57 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
58 $this->assertContains('flashes.import.notice.summary', $body[0]); 58 $this->assertContains('flashes.import.notice.summary', $body[0]);
59 } 59 }
60 60
@@ -68,10 +68,10 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
68 68
69 $file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v1-read.json', 'wallabag-v1-read.json'); 69 $file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v1-read.json', 'wallabag-v1-read.json');
70 70
71 $data = array( 71 $data = [
72 'upload_import_file[file]' => $file, 72 'upload_import_file[file]' => $file,
73 'upload_import_file[mark_as_read]' => 1, 73 'upload_import_file[mark_as_read]' => 1,
74 ); 74 ];
75 75
76 $client->submit($form, $data); 76 $client->submit($form, $data);
77 77
@@ -99,7 +99,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
99 99
100 $this->assertTrue($content2->isArchived()); 100 $this->assertTrue($content2->isArchived());
101 101
102 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); 102 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
103 $this->assertContains('flashes.import.notice.summary', $body[0]); 103 $this->assertContains('flashes.import.notice.summary', $body[0]);
104 } 104 }
105 105
@@ -113,9 +113,9 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
113 113
114 $file = new UploadedFile(__DIR__.'/../fixtures/test.txt', 'test.txt'); 114 $file = new UploadedFile(__DIR__.'/../fixtures/test.txt', 'test.txt');
115 115
116 $data = array( 116 $data = [
117 'upload_import_file[file]' => $file, 117 'upload_import_file[file]' => $file,
118 ); 118 ];
119 119
120 $client->submit($form, $data); 120 $client->submit($form, $data);
121 121
@@ -123,7 +123,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
123 123
124 $crawler = $client->followRedirect(); 124 $crawler = $client->followRedirect();
125 125
126 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); 126 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
127 $this->assertContains('flashes.import.notice.failed', $body[0]); 127 $this->assertContains('flashes.import.notice.failed', $body[0]);
128 } 128 }
129} 129}
diff --git a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
index 490f9ede..15251ae7 100644
--- a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
+++ b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
@@ -29,9 +29,9 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
29 29
30 $file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v2.json', 'wallabag-v2.json'); 30 $file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v2.json', 'wallabag-v2.json');
31 31
32 $data = array( 32 $data = [
33 'upload_import_file[file]' => $file, 33 'upload_import_file[file]' => $file,
34 ); 34 ];
35 35
36 $client->submit($form, $data); 36 $client->submit($form, $data);
37 37
@@ -39,7 +39,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
39 39
40 $crawler = $client->followRedirect(); 40 $crawler = $client->followRedirect();
41 41
42 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); 42 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
43 $this->assertContains('flashes.import.notice.summary', $body[0]); 43 $this->assertContains('flashes.import.notice.summary', $body[0]);
44 44
45 $content = $client->getContainer() 45 $content = $client->getContainer()
@@ -79,9 +79,9 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
79 79
80 $file = new UploadedFile(__DIR__.'/../fixtures/test.txt', 'test.txt'); 80 $file = new UploadedFile(__DIR__.'/../fixtures/test.txt', 'test.txt');
81 81
82 $data = array( 82 $data = [
83 'upload_import_file[file]' => $file, 83 'upload_import_file[file]' => $file,
84 ); 84 ];
85 85
86 $client->submit($form, $data); 86 $client->submit($form, $data);
87 87
@@ -89,7 +89,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
89 89
90 $crawler = $client->followRedirect(); 90 $crawler = $client->followRedirect();
91 91
92 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); 92 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
93 $this->assertContains('flashes.import.notice.failed', $body[0]); 93 $this->assertContains('flashes.import.notice.failed', $body[0]);
94 } 94 }
95} 95}
diff --git a/src/Wallabag/ImportBundle/Tests/Import/ImportCompilerPassTest.php b/src/Wallabag/ImportBundle/Tests/Import/ImportCompilerPassTest.php
index bd62ab3b..b22fcfbc 100644
--- a/src/Wallabag/ImportBundle/Tests/Import/ImportCompilerPassTest.php
+++ b/src/Wallabag/ImportBundle/Tests/Import/ImportCompilerPassTest.php
@@ -25,7 +25,7 @@ class ImportCompilerPassTest extends \PHPUnit_Framework_TestCase
25 25
26 $container 26 $container
27 ->register('foo') 27 ->register('foo')
28 ->addTag('wallabag_import.import', array('alias' => 'pocket')) 28 ->addTag('wallabag_import.import', ['alias' => 'pocket'])
29 ; 29 ;
30 30
31 $this->process($container); 31 $this->process($container);
diff --git a/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
index 43b60ec3..cb171572 100644
--- a/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
+++ b/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php
@@ -73,7 +73,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
73 ); 73 );
74 74
75 $this->logHandler = new TestHandler(); 75 $this->logHandler = new TestHandler();
76 $logger = new Logger('test', array($this->logHandler)); 76 $logger = new Logger('test', [$this->logHandler]);
77 $pocket->setLogger($logger); 77 $pocket->setLogger($logger);
78 78
79 return $pocket; 79 return $pocket;
diff --git a/src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php
index 3ef852e5..8c967e1b 100644
--- a/src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php
+++ b/src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php
@@ -30,7 +30,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
30 $wallabag = new WallabagV1Import($this->em, $this->contentProxy); 30 $wallabag = new WallabagV1Import($this->em, $this->contentProxy);
31 31
32 $this->logHandler = new TestHandler(); 32 $this->logHandler = new TestHandler();
33 $logger = new Logger('test', array($this->logHandler)); 33 $logger = new Logger('test', [$this->logHandler]);
34 $wallabag->setLogger($logger); 34 $wallabag->setLogger($logger);
35 35
36 if (false === $unsetUser) { 36 if (false === $unsetUser) {
diff --git a/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php
index dbefdee3..b0667c9a 100644
--- a/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php
+++ b/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php
@@ -30,7 +30,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
30 $wallabag = new WallabagV2Import($this->em, $this->contentProxy); 30 $wallabag = new WallabagV2Import($this->em, $this->contentProxy);
31 31
32 $this->logHandler = new TestHandler(); 32 $this->logHandler = new TestHandler();
33 $logger = new Logger('test', array($this->logHandler)); 33 $logger = new Logger('test', [$this->logHandler]);
34 $wallabag->setLogger($logger); 34 $wallabag->setLogger($logger);
35 35
36 if (false === $unsetUser) { 36 if (false === $unsetUser) {