From 951b6928a2a79a4ccf19969bc1a883bb3b564ab8 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Sun, 20 Mar 2016 02:33:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B7=D0=BE=D0=B2=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=B5=D1=81=D0=B5=D0=BD=D1=8B=20=D0=B2=20=D0=BE=D1=82?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D0=B5=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=B8=D0=BD=D1=81=D1=82=D0=B2=D0=BE=20?= =?UTF-8?q?=D0=B8=D0=BC=D1=91=D0=BD=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=BE?= =?UTF-8?q?=D0=B2=20(=D1=85=D0=B7,=20=D0=BF=D0=BE=D1=87=D0=B5=D0=BC=D1=83?= =?UTF-8?q?=20=D0=BE=D0=BD=D0=BE=20=D0=BF=D1=80=D0=B5=D0=B6=D0=B4=D0=B5=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=BB=D0=BE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/models/ChangePasswordForm.php | 3 ++- api/models/ChangeUsernameForm.php | 3 ++- api/models/ConfirmEmailForm.php | 3 ++- api/models/LoginForm.php | 3 ++- api/models/RegistrationForm.php | 3 ++- api/models/RepeatAccountActivationForm.php | 3 ++- api/models/{BaseApiForm.php => base/ApiForm.php} | 4 ++-- .../KeyConfirmationForm.php} | 4 ++-- .../PasswordProtectedForm.php} | 4 ++-- .../{BaseApiFormTest.php => base/ApiFormTest.php} | 13 +++++++------ .../{ => base}/BasePasswordProtectedFormTest.php | 8 ++++---- .../KeyConfirmationFormTest.php} | 8 ++++---- 12 files changed, 33 insertions(+), 26 deletions(-) rename api/models/{BaseApiForm.php => base/ApiForm.php} (61%) rename api/models/{BaseKeyConfirmationForm.php => base/KeyConfirmationForm.php} (92%) rename api/models/{BasePasswordProtectedForm.php => base/PasswordProtectedForm.php} (88%) rename tests/codeception/api/unit/models/{BaseApiFormTest.php => base/ApiFormTest.php} (69%) rename tests/codeception/api/unit/models/{ => base}/BasePasswordProtectedFormTest.php (82%) rename tests/codeception/api/unit/models/{BaseKeyConfirmationFormTest.php => base/KeyConfirmationFormTest.php} (91%) diff --git a/api/models/ChangePasswordForm.php b/api/models/ChangePasswordForm.php index 33b6c70..b112f64 100644 --- a/api/models/ChangePasswordForm.php +++ b/api/models/ChangePasswordForm.php @@ -1,10 +1,11 @@ validate()) { diff --git a/api/models/LoginForm.php b/api/models/LoginForm.php index a123560..0d43056 100644 --- a/api/models/LoginForm.php +++ b/api/models/LoginForm.php @@ -1,10 +1,11 @@ specify('model should load data without ModelName array scope', function() use ($model) { + $model = new DummyApiForm(); + $this->specify('model should load data without ModelName array scope', function () use ($model) { expect('model successful load data without prefix', $model->load(['field' => 'test-data']))->true(); expect('field is set as passed data', $model->field)->equals('test-data'); }); @@ -18,7 +19,7 @@ class BaseApiFormTest extends TestCase { } -class DummyBaseApiForm extends BaseApiForm { +class DummyApiForm extends ApiForm { public $field; diff --git a/tests/codeception/api/unit/models/BasePasswordProtectedFormTest.php b/tests/codeception/api/unit/models/base/BasePasswordProtectedFormTest.php similarity index 82% rename from tests/codeception/api/unit/models/BasePasswordProtectedFormTest.php rename to tests/codeception/api/unit/models/base/BasePasswordProtectedFormTest.php index d51e1aa..2256163 100644 --- a/tests/codeception/api/unit/models/BasePasswordProtectedFormTest.php +++ b/tests/codeception/api/unit/models/base/BasePasswordProtectedFormTest.php @@ -1,12 +1,12 @@ $key, ]); }