Skip to content

test: add tests for Model timestamp#8249

Merged
kenjis merged 4 commits intocodeigniter4:developfrom
kenjis:test-add-tests-model-timestamp
Nov 26, 2023
Merged

test: add tests for Model timestamp#8249
kenjis merged 4 commits intocodeigniter4:developfrom
kenjis:test-add-tests-model-timestamp

Conversation

@kenjis
Copy link
Copy Markdown
Member

@kenjis kenjis commented Nov 25, 2023

Description

  • add tests for the current behaviors.

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • [] User guide updated
  • Conforms to style guide

@kenjis kenjis added the testing Pull requests that changes tests only label Nov 25, 2023
@kenjis kenjis force-pushed the test-add-tests-model-timestamp branch 3 times, most recently from 2ec8d2e to 774bd5d Compare November 25, 2023 05:30
@kenjis kenjis force-pushed the test-add-tests-model-timestamp branch from 774bd5d to d690553 Compare November 25, 2023 06:04
@kenjis
Copy link
Copy Markdown
Member Author

kenjis commented Nov 25, 2023

Only SQLSRV returns datetime with milliseconds.

1) CodeIgniter\Models\TimestampModelTest::testDoNotAllowDatesInsertArrayWithoutDatesSetsTimestamp
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'2023-11-25 12:00:00'
+'2023-11-25 12:00:00.000'

/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Models/TimestampModelTest.php:93
phpvfscomposer:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpunit/phpunit/phpunit:106

https://github.com/codeigniter4/CodeIgniter4/actions/runs/6987412341/job/19014063118?pr=8249

@kenjis kenjis merged commit 99c1a4b into codeigniter4:develop Nov 26, 2023
@kenjis kenjis deleted the test-add-tests-model-timestamp branch November 26, 2023 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Pull requests that changes tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants