Skip to content

test: add tests for Model timestamp #8249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 26, 2023

Conversation

kenjis
Copy link
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
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