2
0

EventQueryExceptionTest.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Gdata
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. require_once 'Zend/Gdata/Calendar.php';
  22. require_once 'Zend/Gdata/Calendar/EventQuery.php';
  23. require_once 'Zend/Http/Client.php';
  24. require_once 'PHPUnit/Framework/TestCase.php';
  25. /**
  26. * @package Zend_Gdata
  27. * @subpackage UnitTests
  28. */
  29. class Zend_Gdata_Calendar_EventQueryExceptionTest extends PHPUnit_Framework_TestCase
  30. {
  31. const GOOGLE_DEVELOPER_CALENDAR = 'developer-calendar@google.com';
  32. public function setUp()
  33. {
  34. $this->query = new Zend_Gdata_Calendar_EventQuery();
  35. }
  36. /**
  37. * @expectedException Zend_Gdata_App_Exception
  38. */
  39. public function testSingleEventsThrowsExceptionOnSetInvalidValue()
  40. {
  41. $this->query->resetParameters();
  42. $singleEvents = 'puppy';
  43. $this->query->setUser(self::GOOGLE_DEVELOPER_CALENDAR);
  44. $this->query->setSingleEvents($singleEvents);
  45. }
  46. /**
  47. * @expectedException Zend_Gdata_App_Exception
  48. */
  49. public function testFutureEventsThrowsExceptionOnSetInvalidValue()
  50. {
  51. $this->query->resetParameters();
  52. $futureEvents = 'puppy';
  53. $this->query->setUser(self::GOOGLE_DEVELOPER_CALENDAR);
  54. $this->query->setFutureEvents($futureEvents);
  55. }
  56. }