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:
parent
8abea942b3
commit
03111e510c
24 changed files with 4555 additions and 65 deletions
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue