renderer_table_tests.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * ezcDocumentPdfDriverTcpdfTests
  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 'base.php';
  28. /**
  29. * Test suite for class.
  30. *
  31. * @package Document
  32. * @subpackage Tests
  33. */
  34. class ezcDocumentPdfTableRendererTests extends ezcDocumentPdfTestCase
  35. {
  36. protected $document;
  37. protected $xpath;
  38. protected $styles;
  39. public static function suite()
  40. {
  41. return new PHPUnit_Framework_TestSuite( __CLASS__ );
  42. }
  43. public static function getTableDocuments()
  44. {
  45. return array(
  46. array( dirname( __FILE__ ) . '/../files/pdf/simple_tables.xml' ),
  47. array( dirname( __FILE__ ) . '/../files/pdf/tables_with_list.xml' ),
  48. array( dirname( __FILE__ ) . '/../files/pdf/stacked_table.xml' ),
  49. array( dirname( __FILE__ ) . '/../files/pdf/wrapped_table.xml' ),
  50. array( dirname( __FILE__ ) . '/../files/pdf/irregular_tables_1.xml' ),
  51. array( dirname( __FILE__ ) . '/../files/pdf/irregular_tables_2.xml' ),
  52. array( dirname( __FILE__ ) . '/../files/pdf/irregular_tables_3.xml' ),
  53. );
  54. }
  55. /**
  56. * @dataProvider getTableDocuments
  57. */
  58. public function testRenderTables( $file )
  59. {
  60. $this->renderFullDocument( $file, __CLASS__ . '_' . basename( $file, '.xml' ) . '.svg', array() );
  61. }
  62. }
  63. ?>