/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { require_once 'vendor/autoload.php'; include 'config/config.php'; $app = \MfBase\MfWrapper::create($config); $this->object = new \MfPackage\MfBaseManager(); ORM::for_table('members')->delete_many(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { require_once 'vendor/autoload.php'; include 'config/config.php'; $config = []; $app = \MfBase\MfWrapper::create($config); $this->app = $app; $this->object = new TestValidation($app); // カスタムバリデーションルール $this->object->setExtendValidation('hogehoge', function ($attribute, $value = null, $parameters = null) { return 1 === $value; }, ':attributeは不正です'); }