mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-30 23:01:52 +00:00
25 lines
486 B
PHP
25 lines
486 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('_ruleMessages', array());
|
|
}
|
|
|
|
protected function resetProperty($name, $value = null)
|
|
{
|
|
$prop = new ReflectionProperty('Valitron\Validator', $name);
|
|
$prop->setAccessible(true);
|
|
$prop->setValue($value);
|
|
$prop->setAccessible(false);
|
|
}
|
|
}
|