DatePeriod_wrong_constructor.phpt 536 B

1234567891011121314151617
  1. --TEST--
  2. DatePeriod: Test wrong __construct parameter
  3. --CREDITS--
  4. Havard Eide <nucleuz@gmail.com>
  5. #PHPTestFest2009 Norway 2009-06-09 \o/
  6. --INI--
  7. date.timezone=UTC
  8. --FILE--
  9. <?php
  10. new DatePeriod();
  11. ?>
  12. --EXPECTF--
  13. Fatal error: Uncaught exception 'Exception' with message 'DatePeriod::__construct(): This constructor accepts either (DateTimeInterface, DateInterval, int) OR (DateTimeInterface, DateInterval, DateTime) OR (string) as arguments.' in %s:%d
  14. Stack trace:
  15. #0 %s(%d): DatePeriod->__construct()
  16. #1 {main}
  17. thrown in %s on line %d