mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-10 17:05:26 +00:00
CS & fix tests
This commit is contained in:
parent
b6c1e1bacc
commit
36b0d52ee4
1 changed files with 36 additions and 15 deletions
|
@ -36,7 +36,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => '',
|
'title' => '',
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => '',
|
'headers' => [
|
||||||
|
'content-type' => '',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -71,7 +73,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => '',
|
'title' => '',
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => '',
|
'headers' => [
|
||||||
|
'content-type' => '',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -106,7 +110,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => 'my title',
|
'title' => 'my title',
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => '',
|
'headers' => [
|
||||||
|
'content-type' => '',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
'status' => '',
|
'status' => '',
|
||||||
'description' => 'desc',
|
'description' => 'desc',
|
||||||
|
@ -361,14 +367,13 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => str_repeat('this is my content', 325),
|
'html' => str_repeat('this is my content', 325),
|
||||||
'title' => 'this is my title',
|
'title' => 'this is my title',
|
||||||
'url' => 'http://1.1.1.1',
|
'url' => 'http://1.1.1.1',
|
||||||
'content_type' => 'text/html',
|
'headers' => [
|
||||||
|
'content-type' => 'text/html',
|
||||||
|
],
|
||||||
'language' => 'fr',
|
'language' => 'fr',
|
||||||
'status' => '200',
|
'status' => '200',
|
||||||
'description' => 'OG desc',
|
'description' => 'OG desc',
|
||||||
'image' => 'https://',
|
'image' => 'https://',
|
||||||
'headers' => [
|
|
||||||
'content-type' => 'text/html',
|
|
||||||
],
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$proxy = new ContentProxy($graby, $tagger, $validator, $this->getLogger(), $this->fetchingErrorMessage);
|
$proxy = new ContentProxy($graby, $tagger, $validator, $this->getLogger(), $this->fetchingErrorMessage);
|
||||||
|
@ -641,7 +646,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => $actualTitle,
|
'title' => $actualTitle,
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => 'text/html',
|
'headers' => [
|
||||||
|
'content-type' => 'text/html',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -676,7 +683,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => $actualTitle,
|
'title' => $actualTitle,
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => 'text/html',
|
'headers' => [
|
||||||
|
'content-type' => 'text/html',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -710,7 +719,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => $actualTitle,
|
'title' => $actualTitle,
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => 'application/pdf',
|
'headers' => [
|
||||||
|
'content-type' => 'application/pdf',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -744,7 +755,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => $actualTitle,
|
'title' => $actualTitle,
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => 'application/pdf',
|
'headers' => [
|
||||||
|
'content-type' => 'application/pdf',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -778,7 +791,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => $actualTitle,
|
'title' => $actualTitle,
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => 'application/pdf',
|
'headers' => [
|
||||||
|
'content-type' => 'application/pdf',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -813,7 +828,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => $actualTitle,
|
'title' => $actualTitle,
|
||||||
'url' => '',
|
'url' => '',
|
||||||
'content_type' => 'application/pdf',
|
'headers' => [
|
||||||
|
'content-type' => 'application/pdf',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -943,7 +960,9 @@ class ContentProxyTest extends TestCase
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'title' => '',
|
'title' => '',
|
||||||
'url' => $content_url,
|
'url' => $content_url,
|
||||||
'content_type' => '',
|
'headers' => [
|
||||||
|
'content-type' => '',
|
||||||
|
],
|
||||||
'language' => '',
|
'language' => '',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
|
@ -974,7 +993,9 @@ class ContentProxyTest extends TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://stackoverflow.com/a/18506801.
|
* Convert hex to string.
|
||||||
|
*
|
||||||
|
* @see https://stackoverflow.com/a/18506801
|
||||||
*
|
*
|
||||||
* @param $hex
|
* @param $hex
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue