diff --git a/src/Forms/Controls/DateTimeControl.php b/src/Forms/Controls/DateTimeControl.php index 1881a877..ee9f0664 100644 --- a/src/Forms/Controls/DateTimeControl.php +++ b/src/Forms/Controls/DateTimeControl.php @@ -129,7 +129,7 @@ public function formatHtmlValue(\DateTimeInterface|string|int $value): string return $this->normalizeValue($value)->format(match ($this->type) { self::TypeDate => 'Y-m-d', self::TypeTime => $this->withSeconds ? 'H:i:s' : 'H:i', - self::TypeDateTime => $this->withSeconds ? 'Y-m-d\\TH:i:s' : 'Y-m-d\\TH:i', + self::TypeDateTime => $this->withSeconds ? 'Y-m-d\TH:i:s' : 'Y-m-d\TH:i', }); } diff --git a/tests/Forms/Controls.UploadControl.loadData.phpt b/tests/Forms/Controls.UploadControl.loadData.phpt index b43a5d71..78a132aa 100644 --- a/tests/Forms/Controls.UploadControl.loadData.phpt +++ b/tests/Forms/Controls.UploadControl.loadData.phpt @@ -29,7 +29,7 @@ $_FILES = [ 'container' => [ 'name' => ['avatar' => "invalid\xAA\xAA\xAAutf"], 'type' => ['avatar' => 'text/plain'], - 'tmp_name' => ['avatar' => 'C:\\PHP\\temp\\php1D5C.tmp'], + 'tmp_name' => ['avatar' => 'C:\PHP\temp\php1D5C.tmp'], 'error' => ['avatar' => 0], 'size' => ['avatar' => 3013], ], @@ -91,7 +91,7 @@ test('container', function () { 'name' => '', 'type' => '', 'size' => 3013, - 'tmp_name' => 'C:\\PHP\\temp\\php1D5C.tmp', + 'tmp_name' => 'C:\PHP\temp\php1D5C.tmp', 'error' => 0, ]), $input->getValue()); Assert::true($input->isFilled()); diff --git a/tests/Forms/Helpers.exportRules.phpt b/tests/Forms/Helpers.exportRules.phpt index b7f927a2..62d58c50 100644 --- a/tests/Forms/Helpers.exportRules.phpt +++ b/tests/Forms/Helpers.exportRules.phpt @@ -101,6 +101,6 @@ test('addFilter', function () { $input->setRequired(false); $input->addRule(Form::Email); Assert::same([ - ['op' => ':pattern', 'msg' => 'match pattern', 'arg' => '\\d+'], + ['op' => ':pattern', 'msg' => 'match pattern', 'arg' => '\d+'], ], Helpers::exportRules($input->getRules())); });