mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Merge remote-tracking branch 'origin/master' into 2.6.0
This commit is contained in:
commit
c372d68cc1
32 changed files with 691 additions and 432 deletions
|
@ -159,6 +159,25 @@ class EntryRestControllerTest extends WallabagApiTestCase
|
|||
$this->assertSame('application/json', $this->client->getResponse()->headers->get('Content-Type'));
|
||||
}
|
||||
|
||||
public function testGetEntriesByDomainName()
|
||||
{
|
||||
$this->client->request('GET', '/api/entries?domain_name=domain.io');
|
||||
|
||||
$this->assertSame(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
|
||||
$this->assertGreaterThanOrEqual(1, \count($content));
|
||||
$this->assertNotEmpty($content['_embedded']['items']);
|
||||
$this->assertGreaterThanOrEqual(1, $content['total']);
|
||||
$this->assertSame(1, $content['page']);
|
||||
$this->assertGreaterThanOrEqual(1, $content['pages']);
|
||||
|
||||
$this->assertSame('test title entry6', $content['_embedded']['items'][0]['title']);
|
||||
|
||||
$this->assertSame('application/json', $this->client->getResponse()->headers->get('Content-Type'));
|
||||
}
|
||||
|
||||
public function testGetEntriesWithFullOptions()
|
||||
{
|
||||
$this->client->request('GET', '/api/entries', [
|
||||
|
|
|
@ -22,14 +22,13 @@ class TagRestControllerTest extends WallabagApiTestCase
|
|||
$this->assertGreaterThan(0, $content);
|
||||
$this->assertArrayHasKey('id', $content[0]);
|
||||
$this->assertArrayHasKey('label', $content[0]);
|
||||
$this->assertArrayHasKey('nbEntries', $content[0]);
|
||||
|
||||
$tagLabels = array_map(function ($i) {
|
||||
return $i['label'];
|
||||
}, $content);
|
||||
|
||||
$this->assertNotContains($this->otherUserTagLabel, $tagLabels, 'There is a possible tag leak');
|
||||
|
||||
return end($content);
|
||||
}
|
||||
|
||||
public function testDeleteUserTag()
|
||||
|
|
|
@ -1502,8 +1502,8 @@ class EntryControllerTest extends WallabagCoreTestCase
|
|||
'pt_BR',
|
||||
],
|
||||
'es-ES' => [
|
||||
'https://www.20minutos.es/noticia/3360685/0/gobierno-sanchez-primero-historia-mas-mujeres-que-hombres/',
|
||||
'es_ES',
|
||||
'https://elpais.com/internacional/2022-10-09/ultima-hora-de-la-guerra-en-ucrania-hoy-en-directo.html',
|
||||
'es',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ class DownloadImagesTest extends TestCase
|
|||
$this->assertFalse($res);
|
||||
}
|
||||
|
||||
public function testEnsureOnlyFirstOccurenceIsReplaced()
|
||||
public function testEnsureOnlyFirstOccurrenceIsReplaced()
|
||||
{
|
||||
$httpMockClient = new HttpMockClient();
|
||||
$httpMockClient->addResponse(new Response(200, ['content-type' => 'image/png'], file_get_contents(__DIR__ . '/../fixtures/unnamed.png')));
|
||||
|
|
|
@ -118,7 +118,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
|
|||
->get(EntityManagerInterface::class)
|
||||
->getRepository(Entry::class)
|
||||
->findByUrlAndUserId(
|
||||
'https://lexpansion.lexpress.fr/high-tech/orange-offre-un-meilleur-reseau-mobile-que-bouygues-et-sfr-free-derriere_1811554.html',
|
||||
'https://www.20minutes.fr/sport/4002755-20220928-tarn-lapins-ravagent-terrain-match-rugby-doit-etre-annule',
|
||||
$this->getLoggedInUserId()
|
||||
);
|
||||
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
"children": [
|
||||
{
|
||||
"guid": "tard77lzbC5H",
|
||||
"title": "Orange offre un meilleur réseau mobile que Bouygues et SFR, Free derrière - L'Express L'Expansion",
|
||||
"title": "Tarn : Des lapins ravagent le terrain, le match de rugby doit être annulé",
|
||||
"index": 1,
|
||||
"dateAdded": 1388166091644000,
|
||||
"lastModified": 1388166091644000,
|
||||
"tags": "test,tag",
|
||||
"id": 4,
|
||||
"type": "text/x-moz-place",
|
||||
"uri": "http://lexpansion.lexpress.fr/high-tech/orange-offre-un-meilleur-reseau-mobile-que-bouygues-et-sfr-free-derriere_1811554.html"
|
||||
"uri": "https://www.20minutes.fr/sport/4002755-20220928-tarn-lapins-ravagent-terrain-match-rugby-doit-etre-annule"
|
||||
},
|
||||
{
|
||||
"guid": "E385l9vZ_LVn",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue