Sort out web syndication feeds, and add JSON feeds, fixes issue #52
This commit is contained in:
parent
b234e2133b
commit
e848486b33
11 changed files with 301 additions and 41 deletions
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class ArticlesRSSTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Test the RSS feed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_rss_feed()
|
||||
{
|
||||
$response = $this->get('/feed');
|
||||
$response->assertHeader('Content-Type', 'application/rss+xml');
|
||||
}
|
||||
}
|
77
tests/Feature/FeedsTest.php
Normal file
77
tests/Feature/FeedsTest.php
Normal file
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class FeedsTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Test the blog RSS feed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_blog_rss_feed()
|
||||
{
|
||||
$response = $this->get('/blog/feed.rss');
|
||||
$response->assertHeader('Content-Type', 'application/rss+xml; charset=utf-8');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the notes RSS feed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_notes_rss_feed()
|
||||
{
|
||||
$response = $this->get('/notes/feed.rss');
|
||||
$response->assertHeader('Content-Type', 'application/rss+xml; charset=utf-8');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the blog RSS feed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_blog_atom_feed()
|
||||
{
|
||||
$response = $this->get('/blog/feed.atom');
|
||||
$response->assertHeader('Content-Type', 'application/atom+xml; charset=utf-8');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the notes RSS feed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_notes_atom_feed()
|
||||
{
|
||||
$response = $this->get('/notes/feed.atom');
|
||||
$response->assertHeader('Content-Type', 'application/atom+xml; charset=utf-8');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the blog JSON feed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_blog_json_feed()
|
||||
{
|
||||
$response = $this->get('/blog/feed.json');
|
||||
$response->assertHeader('Content-Type', 'application/json');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the notes JSON feed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_notes_json_feed()
|
||||
{
|
||||
$response = $this->get('/notes/feed.json');
|
||||
$response->assertHeader('Content-Type', 'application/json');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue