Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

127 rader
3.6 KiB

  1. <?php
  2. /**
  3. * PHPExcel
  4. *
  5. * Copyright (C) 2006 - 2014 PHPExcel
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. *
  21. * @category PHPExcel
  22. * @package PHPExcel
  23. * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
  24. * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
  25. * @version 1.8.0, 2014-03-02
  26. */
  27. /** Error reporting */
  28. error_reporting(E_ALL);
  29. if (PHP_SAPI != 'cli') {
  30. die ('This script executes all tests, and should only be run from the command line');
  31. }
  32. // List of tests
  33. $aTests = array(
  34. '01simple.php'
  35. , '01simplePCLZip.php'
  36. , '02types.php'
  37. , '02types-xls.php'
  38. , '03formulas.php'
  39. , '04printing.php'
  40. , '05featuredemo.php'
  41. , '06largescale.php'
  42. , '06largescale-with-cellcaching.php'
  43. , '06largescale-with-cellcaching-sqlite.php'
  44. , '06largescale-with-cellcaching-sqlite3.php'
  45. , '06largescale-xls.php'
  46. , '07reader.php'
  47. , '07readerPCLZip.php'
  48. , '08conditionalformatting.php'
  49. , '08conditionalformatting2.php'
  50. , '09pagebreaks.php'
  51. , '10autofilter.php'
  52. , '10autofilter-selection-1.php'
  53. , '10autofilter-selection-2.php'
  54. , '10autofilter-selection-display.php'
  55. , '11documentsecurity.php'
  56. , '11documentsecurity-xls.php'
  57. , '12cellProtection.php'
  58. , '13calculation.php'
  59. , '14excel5.php'
  60. , '15datavalidation.php'
  61. , '15datavalidation-xls.php'
  62. , '16csv.php'
  63. , '17html.php'
  64. , '18extendedcalculation.php'
  65. , '19namedrange.php'
  66. , '20readexcel5.php'
  67. , '21pdf.php'
  68. , '22heavilyformatted.php'
  69. , '23sharedstyles.php'
  70. , '24readfilter.php'
  71. , '25inmemoryimage.php'
  72. , '26utf8.php'
  73. , '27imagesexcel5.php'
  74. , '28iterator.php'
  75. , '29advancedvaluebinder.php'
  76. , '30template.php'
  77. , '31docproperties_write.php'
  78. , '31docproperties_write-xls.php'
  79. , '32chartreadwrite.php'
  80. , '33chartcreate-area.php'
  81. , '33chartcreate-bar.php'
  82. , '33chartcreate-bar-stacked.php'
  83. , '33chartcreate-column.php'
  84. , '33chartcreate-column-2.php'
  85. , '33chartcreate-line.php'
  86. , '33chartcreate-pie.php'
  87. , '33chartcreate-radar.php'
  88. , '33chartcreate-stock.php'
  89. , '33chartcreate-multiple-charts.php'
  90. , '33chartcreate-composite.php'
  91. , '34chartupdate.php'
  92. , '35chartrender.php'
  93. , '36chartreadwriteHTML.php'
  94. , '36chartreadwritePDF.php'
  95. , '37page_layout_view.php'
  96. , '38cloneWorksheet.php'
  97. , '40duplicateStyle.php'
  98. , 'OOCalcReader.php'
  99. , 'OOCalcReaderPCLZip.php'
  100. , 'SylkReader.php'
  101. , 'Excel2003XMLReader.php'
  102. , 'XMLReader.php'
  103. , 'GnumericReader.php'
  104. );
  105. // First, clear all results
  106. foreach ($aTests as $sTest) {
  107. @unlink( str_replace('.php', '.xls', $sTest) );
  108. @unlink( str_replace('.php', '.xlsx', $sTest) );
  109. @unlink( str_replace('.php', '.csv', $sTest) );
  110. @unlink( str_replace('.php', '.htm', $sTest) );
  111. @unlink( str_replace('.php', '.pdf', $sTest) );
  112. }
  113. // Run all tests
  114. foreach ($aTests as $sTest) {
  115. echo '============== TEST ==============' . "\r\n";
  116. echo 'Test name: ' . $sTest . "\r\n";
  117. echo "\r\n";
  118. echo shell_exec('php ' . $sTest);
  119. echo "\r\n";
  120. echo "\r\n";
  121. }