forked from wallabag/wallabag
Convert array + phpDoc
Thanks for https://github.com/thomasbachem/php-short-array-syntax-converter
This commit is contained in:
@ -29,9 +29,9 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v1.json', 'wallabag-v1.json');
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -54,7 +54,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertTrue($content->getTags()->contains($tag));
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('flashes.import.notice.summary', $body[0]);
|
||||
}
|
||||
|
||||
@ -68,10 +68,10 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v1-read.json', 'wallabag-v1-read.json');
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
'upload_import_file[mark_as_read]' => 1,
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -99,7 +99,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertTrue($content2->isArchived());
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('flashes.import.notice.summary', $body[0]);
|
||||
}
|
||||
|
||||
@ -113,9 +113,9 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$file = new UploadedFile(__DIR__.'/../fixtures/test.txt', 'test.txt');
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -123,7 +123,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('flashes.import.notice.failed', $body[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,9 +29,9 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$file = new UploadedFile(__DIR__.'/../fixtures/wallabag-v2.json', 'wallabag-v2.json');
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -39,7 +39,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('flashes.import.notice.summary', $body[0]);
|
||||
|
||||
$content = $client->getContainer()
|
||||
@ -79,9 +79,9 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$file = new UploadedFile(__DIR__.'/../fixtures/test.txt', 'test.txt');
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'upload_import_file[file]' => $file,
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -89,7 +89,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('flashes.import.notice.failed', $body[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ class ImportCompilerPassTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$container
|
||||
->register('foo')
|
||||
->addTag('wallabag_import.import', array('alias' => 'pocket'))
|
||||
->addTag('wallabag_import.import', ['alias' => 'pocket'])
|
||||
;
|
||||
|
||||
$this->process($container);
|
||||
|
||||
@ -73,7 +73,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', array($this->logHandler));
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$pocket->setLogger($logger);
|
||||
|
||||
return $pocket;
|
||||
|
||||
@ -30,7 +30,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
|
||||
$wallabag = new WallabagV1Import($this->em, $this->contentProxy);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', array($this->logHandler));
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$wallabag->setLogger($logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
|
||||
@ -30,7 +30,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
|
||||
$wallabag = new WallabagV2Import($this->em, $this->contentProxy);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', array($this->logHandler));
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$wallabag->setLogger($logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
|
||||
Reference in New Issue
Block a user