summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/tests/Client/ClientTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/fguillot/picofeed/tests/Client/ClientTest.php')
-rw-r--r--vendor/fguillot/picofeed/tests/Client/ClientTest.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/vendor/fguillot/picofeed/tests/Client/ClientTest.php b/vendor/fguillot/picofeed/tests/Client/ClientTest.php
index 98a963644..0a480c5c0 100644
--- a/vendor/fguillot/picofeed/tests/Client/ClientTest.php
+++ b/vendor/fguillot/picofeed/tests/Client/ClientTest.php
@@ -1,9 +1,9 @@
<?php
+
namespace PicoFeed\Client;
use PHPUnit_Framework_TestCase;
-
class ClientTest extends PHPUnit_Framework_TestCase
{
public function testDownload()
@@ -18,7 +18,6 @@ class ClientTest extends PHPUnit_Framework_TestCase
$this->assertNotEmpty($client->getLastModified());
}
-
public function testCacheEtag()
{
$client = Client::getInstance();
@@ -34,7 +33,6 @@ class ClientTest extends PHPUnit_Framework_TestCase
$this->assertFalse($client->isModified());
}
-
public function testCacheLastModified()
{
$client = Client::getInstance();
@@ -50,7 +48,6 @@ class ClientTest extends PHPUnit_Framework_TestCase
$this->assertFalse($client->isModified());
}
-
public function testCacheBoth()
{
$client = Client::getInstance();
@@ -80,4 +77,17 @@ class ClientTest extends PHPUnit_Framework_TestCase
$client->execute();
$this->assertEquals('', $client->getEncoding());
}
-} \ No newline at end of file
+
+ public function testContentType()
+ {
+ $client = Client::getInstance();
+ $client->setUrl('http://miniflux.net/assets/img/favicon.png');
+ $client->execute();
+ $this->assertEquals('image/png', $client->getContentType());
+
+ $client = Client::getInstance();
+ $client->setUrl('http://miniflux.net/');
+ $client->execute();
+ $this->assertEquals('text/html; charset=utf-8', $client->getContentType());
+ }
+}