DateFormatTest.php 383 B

12345678910111213141516171819
  1. <?php
  2. include 'helpers/config.php';
  3. class DateFormatTest extends DatabaseTest
  4. {
  5. public function test_datefield_gets_converted_to_ar_datetime()
  6. {
  7. //make sure first author has a date
  8. $author = Author::first();
  9. $author->some_date = new DateTime();
  10. $author->save();
  11. $author = Author::first();
  12. $this->assert_is_a("ActiveRecord\\DateTime",$author->some_date);
  13. }
  14. };
  15. ?>