runall.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. /**
  3. * PHPExcel
  4. *
  5. * Copyright (c) 2006 - 2015 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 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
  24. * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
  25. * @version ##VERSION##, ##DATE##
  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. , '13calculationCyclicFormulae.php'
  60. , '14excel5.php'
  61. , '15datavalidation.php'
  62. , '15datavalidation-xls.php'
  63. , '16csv.php'
  64. , '17html.php'
  65. , '18extendedcalculation.php'
  66. , '19namedrange.php'
  67. , '20readexcel5.php'
  68. , '21pdf.php'
  69. , '22heavilyformatted.php'
  70. , '23sharedstyles.php'
  71. , '24readfilter.php'
  72. , '25inmemoryimage.php'
  73. , '26utf8.php'
  74. , '27imagesexcel5.php'
  75. , '28iterator.php'
  76. , '29advancedvaluebinder.php'
  77. , '30template.php'
  78. , '31docproperties_write.php'
  79. , '31docproperties_write-xls.php'
  80. , '32chartreadwrite.php'
  81. , '33chartcreate-area.php'
  82. , '33chartcreate-bar.php'
  83. , '33chartcreate-bar-stacked.php'
  84. , '33chartcreate-column.php'
  85. , '33chartcreate-column-2.php'
  86. , '33chartcreate-line.php'
  87. , '33chartcreate-pie.php'
  88. , '33chartcreate-radar.php'
  89. , '33chartcreate-stock.php'
  90. , '33chartcreate-multiple-charts.php'
  91. , '33chartcreate-composite.php'
  92. , '34chartupdate.php'
  93. , '35chartrender.php'
  94. , '36chartreadwriteHTML.php'
  95. , '36chartreadwritePDF.php'
  96. , '37page_layout_view.php'
  97. , '38cloneWorksheet.php'
  98. , '39dropdown.php'
  99. , '40duplicateStyle.php'
  100. , '41password.php'
  101. , '42richText.php'
  102. , '43mergeWorkbooks.php'
  103. , '44worksheetInfo.php'
  104. , 'OOCalcReader.php'
  105. , 'OOCalcReaderPCLZip.php'
  106. , 'SylkReader.php'
  107. , 'Excel2003XMLReader.php'
  108. , 'XMLReader.php'
  109. , 'GnumericReader.php'
  110. );
  111. // First, clear all previous run results
  112. foreach ($aTests as $sTest) {
  113. @unlink( str_replace('.php', '.xls', $sTest) );
  114. @unlink( str_replace('.php', '.xlsx', $sTest) );
  115. @unlink( str_replace('.php', '.csv', $sTest) );
  116. @unlink( str_replace('.php', '.htm', $sTest) );
  117. @unlink( str_replace('.php', '.pdf', $sTest) );
  118. }
  119. // Run all tests
  120. foreach ($aTests as $sTest) {
  121. echo '============== TEST ==============' . "\r\n";
  122. echo 'Test name: ' . $sTest . "\r\n";
  123. echo "\r\n";
  124. echo shell_exec('php ' . $sTest);
  125. echo "\r\n";
  126. echo "\r\n";
  127. }