diff options
-rw-r--r-- | lib/Controller/ExportController.php | 3 | ||||
-rw-r--r-- | tests/Unit/Db/FeedTest.php | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/Controller/ExportController.php b/lib/Controller/ExportController.php index 1ce81963d..07ce06f45 100644 --- a/lib/Controller/ExportController.php +++ b/lib/Controller/ExportController.php @@ -59,7 +59,8 @@ class ExportController extends Controller $feeds = $this->feedService->findAll($this->userId); $folders = $this->folderService->findAll($this->userId); $opml = $this->opmlExporter->build($folders, $feeds)->saveXML(); - $name = 'subscriptions.opml'; + $date = date('Y-m-d'); + $name = "subscriptions-".$date.".opml"; $mimeType = 'text/xml'; return new TextDownloadResponse($opml, $name, $mimeType); } diff --git a/tests/Unit/Db/FeedTest.php b/tests/Unit/Db/FeedTest.php index 53bfe63f4..47595633d 100644 --- a/tests/Unit/Db/FeedTest.php +++ b/tests/Unit/Db/FeedTest.php @@ -20,7 +20,7 @@ class FeedTest extends TestCase { - private function createFeed() + private function createFeed() { $feed = new Feed(); $feed->setId(3); @@ -45,7 +45,7 @@ class FeedTest extends TestCase return $feed; } - public function testToAPI() + public function testToAPI() { $feed = $this->createFeed(); @@ -68,7 +68,7 @@ class FeedTest extends TestCase } - public function testSerialize() + public function testSerialize() { $feed = $this->createFeed(); @@ -102,9 +102,9 @@ class FeedTest extends TestCase } - public function testSetXSSUrl() + public function testSetXSSUrl() { - $this->setExpectedException(\TypeError::class); + $this->expectException(\TypeError::class); $feed = new Feed(); $feed->setUrl('javascript:alert()'); @@ -112,7 +112,7 @@ class FeedTest extends TestCase } - public function testSetUrlUpdatesHash() + public function testSetUrlUpdatesHash() { $feed = new Feed(); $feed->setUrl('http://test'); @@ -120,7 +120,7 @@ class FeedTest extends TestCase } - public function testSetXSSLink() + public function testSetXSSLink() { $feed = new Feed(); $feed->setLink('javascript:alert()'); |