You are here

function simpletest_example_empty_mysql_date in Examples for Developers 7

A simple self-contained function used to demonstrate unit tests.

See also

SimpletestUnitTestExampleTestCase

Related topics

1 call to simpletest_example_empty_mysql_date()
SimpleTestUnitTestExampleTestCase::testSimpleTestUnitTestExampleFunction in simpletest_example/simpletest_example.test
Test simpletest_example_empty_mysql_date().

File

simpletest_example/simpletest_example.module, line 123
Module file for simpletest_example

Code

function simpletest_example_empty_mysql_date($date_string) {
  if (empty($date_string) || $date_string == '0000-00-00' || $date_string == '0000-00-00 00:00:00') {
    return TRUE;
  }
  return FALSE;
}