Updated CI config for Travis, preload OLE (#16)
* Test only on supported PHP versions on Travis CI. * Preload OLE.php as contains important constants. Were getting: Use of undefined constant OLE_PPS_TYPE_FILE - assumed 'OLE_PPS_TYPE_FILE' (this will throw an Error in a future version of PHP) in OLE/PPS/File.php:60 * Forbid installing on PHP 7.3 for time being. pear/OLE does not really work on PHP 7.3, so this package is also unusable there.
This commit is contained in:
parent
71f006f7ed
commit
2fc22c490b
|
|
@ -2,11 +2,11 @@ sudo: false
|
|||
|
||||
language: php
|
||||
php:
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
|
@ -15,3 +15,5 @@ cache:
|
|||
install:
|
||||
- composer install --prefer-dist
|
||||
|
||||
script:
|
||||
- php vendor/bin/phpunit
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ if (!class_exists('Spreadsheet_Excel_Writer_BIFFwriter')) {
|
|||
require_once 'Spreadsheet/Excel/Writer/Parser.php';
|
||||
}
|
||||
|
||||
if (!class_exists('OLE')) {
|
||||
require_once 'OLE.php';
|
||||
}
|
||||
|
||||
if (!class_exists('OLE_PPS_Root')) {
|
||||
require_once 'OLE/PPS/Root.php';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@
|
|||
"type": "library",
|
||||
"require": {
|
||||
"pear/pear-core-minimal": "^1.10",
|
||||
"pear/ole": "*",
|
||||
"php": ">=5.3.3"
|
||||
"pear/ole": ">=1.0.0RC3",
|
||||
"php": ">=5.3.3 <7.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "<6.0"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@
|
|||
*/
|
||||
class Test_Spreadsheet_Excel_Writer_WorkbookTest extends Test_Spreadsheet_Excel_WriterTestCase
|
||||
{
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
// Preload constants from OLE
|
||||
@class_exists(OLE::class);
|
||||
}
|
||||
|
||||
public function testSetVersion()
|
||||
{
|
||||
$workbook = $this->getNewWorkbook();
|
||||
|
|
|
|||
Loading…
Reference in New Issue