for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Redaxscript\Tests\Validator;
use Redaxscript\Tests\TestCaseAbstract;
use Redaxscript\Validator;
/**
* UserTest
*
* @since 4.3.0
* @package Redaxscript
* @category Tests
* @author Henry Ruhs
* @covers Redaxscript\Validator\User
*/
class UserTest extends TestCaseAbstract
{
* testGetPattern
public function testGetPattern() : void
/* setup */
$validator = new Validator\User();
/* actual */
$actual = $validator->getPattern();
/* compare */
$this->assertIsString($actual);
}
* testValidate
* @param string $user
* @param bool $expect
* @dataProvider providerAutoloader
public function testValidate(string $user = null, bool $expect = null) : void
$actual = $validator->validate($user);
$this->assertEquals($expect, $actual);