HummingBirdAnimeClient/tests/AnimeClient/Types/ConfigTest.php

55 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2021-02-23 15:38:29 -05:00
<?php declare(strict_types=1);
/**
* Hummingbird Anime List Client
*
* An API client for Kitsu to manage anime and manga watch lists
*
2023-07-13 11:08:05 -04:00
* PHP version 8.1
2021-02-23 15:38:29 -05:00
*
2023-07-13 11:08:05 -04:00
* @copyright 2015 - 2023 Timothy J. Warren <tim@timshome.page>
2021-02-23 15:38:29 -05:00
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 5.2
2023-07-13 11:08:05 -04:00
* @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient
2021-02-23 15:38:29 -05:00
*/
namespace Aviat\AnimeClient\Tests\Types;
use Aviat\AnimeClient\Types\Config;
2022-03-04 12:19:47 -05:00
/**
* @internal
*/
final class ConfigTest extends ConfigTestCase
{
protected function setUp(): void
2021-02-23 15:38:29 -05:00
{
parent::setUp();
$this->testClass = Config::class;
}
public function testSetMethods(): void
{
$type = $this->testClass::from([
'anilist' => [],
'cache' => [],
'database' => [],
]);
2022-03-04 12:19:47 -05:00
$this->assertSame(3, $type->count());
2021-02-23 15:38:29 -05:00
}
public function testOffsetUnset(): void
{
$type = $this->testClass::from([
'anilist' => [],
]);
$this->assertTrue($type->offsetExists('anilist'));
$type->offsetUnset('anilist');
$this->assertNotTrue($type->offsetExists('anilist'));
}
2022-03-04 12:19:47 -05:00
}