public function test_find_by_datetime() { $now = new DateTime(); $arnow = new ActiveRecord\DateTime(); $arnow->setTimestamp($now->getTimestamp()); Author::find(1)->update_attribute('created_at', $now); $this->assert_not_null(Author::find_by_created_at($now)); $this->assert_not_null(Author::find_by_created_at($arnow)); }
public function testFindByDatetime() { $now = new DateTime(); $arnow = new ActiveRecord\DateTime(); $arnow->setTimestamp($now->getTimestamp()); Author::find(1)->updateAttribute('created_at', $now); $this->assertNotNull(Author::findByCreatedAt($now)); $this->assertNotNull(Author::findByCreatedAt($arnow)); }
public function test_find_by_datetime() { if (getenv('TRAVIS')) { $this->markTestSkipped('The Travis CI environment seems to screw this up for unknonwn reasons; ' . 'see Github #298 (https://github.com/kla/php-activerecord/issues/298)'); } $now = new DateTime(); $arnow = new ActiveRecord\DateTime(); $arnow->setTimestamp($now->getTimestamp()); Author::find(1)->update_attribute('created_at', $now); $this->assert_not_null(Author::find_by_created_at($now)); $this->assert_not_null(Author::find_by_created_at($arnow)); }