Skip to content

Commit c3ea0e7

Browse files
committed
test: change the order of the code to Arrange, Act, Assert
1 parent fd95b61 commit c3ea0e7

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/system/Models/ValidationModelTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,16 @@ public function testValidationWithGroupName(): void
247247
'token' => 'in_list[{id}]',
248248
];
249249
};
250+
Factories::injectMock('config', 'Validation', $config);
251+
252+
$this->createModel(ValidModel::class);
253+
$this->setPrivateProperty($this->model, 'validationRules', 'grouptest');
250254

251255
$data = [
252256
'name' => 'abc',
253257
'id' => 13,
254258
'token' => 13,
255259
];
256-
257-
Factories::injectMock('config', 'Validation', $config);
258-
259-
$this->createModel(ValidModel::class);
260-
$this->setPrivateProperty($this->model, 'validationRules', 'grouptest');
261260
$this->assertTrue($this->model->validate($data));
262261
}
263262

0 commit comments

Comments
 (0)