document_options_tests.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * ezcDocTestConvertXhtmlDocbook
  4. *
  5. * Licensed to the Apache Software Foundation (ASF) under one
  6. * or more contributor license agreements. See the NOTICE file
  7. * distributed with this work for additional information
  8. * regarding copyright ownership. The ASF licenses this file
  9. * to you under the Apache License, Version 2.0 (the
  10. * "License"); you may not use this file except in compliance
  11. * with the License. You may obtain a copy of the License at
  12. *
  13. * http://www.apache.org/licenses/LICENSE-2.0
  14. *
  15. * Unless required by applicable law or agreed to in writing,
  16. * software distributed under the License is distributed on an
  17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18. * KIND, either express or implied. See the License for the
  19. * specific language governing permissions and limitations
  20. * under the License.
  21. *
  22. * @package Document
  23. * @version //autogen//
  24. * @subpackage Tests
  25. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  26. */
  27. require_once dirname( __FILE__ ) . '/options_test_case.php';
  28. /**
  29. * Test suite for class.
  30. *
  31. * @package Document
  32. * @subpackage Tests
  33. */
  34. class ezcDocumentOptionsTests extends ezcDocumentOptionsTestCase
  35. {
  36. public static function suite()
  37. {
  38. return new PHPUnit_Framework_TestSuite( __CLASS__ );
  39. }
  40. protected function getOptionsClassName()
  41. {
  42. return 'ezcDocumentOptions';
  43. }
  44. public static function provideDefaultValues()
  45. {
  46. return array(
  47. array(
  48. 'errorReporting', 15,
  49. ),
  50. array(
  51. 'validate', true,
  52. ),
  53. );
  54. }
  55. public static function provideValidData()
  56. {
  57. return array(
  58. array(
  59. 'errorReporting',
  60. array( E_PARSE, E_PARSE | E_NOTICE ),
  61. ),
  62. array(
  63. 'validate',
  64. array( true, false ),
  65. ),
  66. );
  67. }
  68. public static function provideInvalidData()
  69. {
  70. return array(
  71. array(
  72. 'errorReporting',
  73. array( 'foo', E_ALL & ~E_PARSE ),
  74. ),
  75. array(
  76. 'validate',
  77. array( 'foo', new StdClass() ),
  78. ),
  79. );
  80. }
  81. }
  82. ?>