1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Integrate bdunogier/guzzle-site-authenticator in core

This commit is contained in:
Yassine Guedidi 2024-02-02 21:56:25 +01:00
parent 8abea942b3
commit 03111e510c
24 changed files with 4555 additions and 65 deletions

View file

@ -0,0 +1,26 @@
<?php
namespace Tests\Wallabag\CoreBundle\SiteConfig;
use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\SiteConfig\ArraySiteConfigBuilder;
use Wallabag\CoreBundle\SiteConfig\SiteConfig;
class ArraySiteConfigBuilderTest extends TestCase
{
public function testItReturnsSiteConfigThatExists()
{
$builder = new ArraySiteConfigBuilder(['example.com' => []]);
$res = $builder->buildForHost('www.example.com');
$this->assertInstanceOf(SiteConfig::class, $res);
}
public function testItReturnsFalseOnAHostThatDoesNotExist()
{
$builder = new ArraySiteConfigBuilder(['anotherexample.com' => []]);
$res = $builder->buildForHost('example.com');
$this->assertfalse($res);
}
}