1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-30 21:30:14 +02:00
* test: refactor test suite

* docs

* refactor

* yup

* docs
This commit is contained in:
Dag
2023-10-01 19:23:30 +02:00
committed by GitHub
parent 0c92cf32d4
commit 41df17bc46
23 changed files with 309 additions and 566 deletions

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace RssBridge\Tests;
use PHPUnit\Framework\TestCase;
class ParameterValidatorTest extends TestCase
{
public function test1()
{
$sut = new \ParameterValidator();
$input = ['user' => 'joe'];
$parameters = [
[
'user' => [
'name' => 'User',
'type' => 'text',
],
]
];
$this->assertTrue($sut->validateInput($input, $parameters));
}
public function test2()
{
$sut = new \ParameterValidator();
$input = ['username' => 'joe'];
$parameters = [
[
'user' => [
'name' => 'User',
'type' => 'text',
],
]
];
$this->assertFalse($sut->validateInput($input, $parameters));
}
}