mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-31 15:11:53 +00:00
26 lines
529 B
PHP
26 lines
529 B
PHP
<?php
|
|
|
|
class BaseTestCase extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function setUp()
|
|
{
|
|
$this->tearDown();
|
|
}
|
|
|
|
public function tearDown()
|
|
{
|
|
$this->resetProperty('_lang');
|
|
$this->resetProperty('_langDir');
|
|
$this->resetProperty('_rules', array());
|
|
$this->resetProperty('_ruleMessages', array());
|
|
}
|
|
|
|
protected function resetProperty($name, $value = null)
|
|
{
|
|
$prop = new ReflectionProperty('Valitron\Validator', $name);
|
|
$prop->setAccessible(true);
|
|
$prop->setValue($value);
|
|
$prop->setAccessible(false);
|
|
}
|
|
}
|