Fixed user-tests after changes to input->all() method.

This commit is contained in:
Simon Sessingø
2021-03-17 20:26:07 +01:00
parent ff8ef9d412
commit 11a69c2f72
2 changed files with 5 additions and 16 deletions

View File

@@ -38,7 +38,8 @@ class InputHandlerTest extends \PHPUnit\Framework\TestCase
$this->assertInstanceOf(\Pecee\Http\Input\InputItem::class, $handler->post('day'));
// Check non-existing and wrong request-type
$this->assertEmpty($handler->all(['non-existing']));
$this->assertCount(1, $handler->all(['non-existing']));
$this->assertEmpty($handler->all(['non-existing'])['non-existing']);
$this->assertNull($handler->value('non-existing'));
$this->assertNull($handler->find('non-existing'));
$this->assertNull($handler->value('names', null, 'get'));
@@ -88,7 +89,8 @@ class InputHandlerTest extends \PHPUnit\Framework\TestCase
$this->assertInstanceOf(\Pecee\Http\Input\InputItem::class, $handler->get('day'));
// Check non-existing and wrong request-type
$this->assertEmpty($handler->all(['non-existing']));
$this->assertCount(1, $handler->all(['non-existing']));
$this->assertEmpty($handler->all(['non-existing'])['non-existing']);
$this->assertNull($handler->value('non-existing'));
$this->assertNull($handler->find('non-existing'));
$this->assertNull($handler->value('names', null, 'post'));