This repository has been archived by the owner on Oct 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore default installed extensions/packages to ubuntu base (#445)
* Restore default installed extensions/packages to ubuntu base * Add test for installing via legacy php.ini method * Fix legacy extensions test directory
- Loading branch information
Showing
25 changed files
with
584 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2017 Google Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM ${BASE_IMAGE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"require": { | ||
"php": "7.2.*", | ||
"phpunit/phpunit": "^4.8.35", | ||
"ext-amqp": "*", | ||
"ext-apm": "*", | ||
"ext-bcmath": "*", | ||
"ext-calendar": "*", | ||
"ext-couchbase": "*", | ||
"ext-ds": "*", | ||
"ext-eio": "*", | ||
"ext-exif": "*", | ||
"ext-ftp": "*", | ||
"ext-gd": "*", | ||
"ext-gettext": "*", | ||
"ext-hprose": "*", | ||
"ext-intl": "*", | ||
"ext-jsond": "*", | ||
"ext-krb5": "*", | ||
"ext-lua": "*", | ||
"ext-lzf": "*", | ||
"ext-memprof": "*", | ||
"ext-pdo_sqlite": "*", | ||
"ext-seaslog": "*", | ||
"ext-shmop": "*", | ||
"ext-soap": "*", | ||
"ext-sqlite3": "*", | ||
"ext-stomp": "*", | ||
"ext-swoole": "*", | ||
"ext-sync": "*", | ||
"ext-tcpwrap": "*", | ||
"ext-timezonedb": "*", | ||
"ext-v8js": "*", | ||
"ext-vips": "*", | ||
"ext-yaconf": "*", | ||
"ext-yaf": "*", | ||
"ext-yaml": "*", | ||
"ext-xmlrpc": "*", | ||
"ext-xsl": "*", | ||
"ext-bitset": "*", | ||
"ext-igbinary": "*", | ||
"ext-iconv": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
extension=cassandra.so | ||
extension=ev.so | ||
extension=event.so | ||
extension=grpc.so | ||
extension=imagick.so | ||
extension=mongodb.so | ||
extension=oauth.so | ||
extension=opencensus.so | ||
extension=pq.so | ||
extension=protobuf.so | ||
extension=rdkafka.so | ||
extension=redis.so | ||
extension=stackdriver_debugger.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="./tests/bootstrap.php" colors="true"> | ||
<testsuites> | ||
<testsuite> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class CassandraTest extends TestCase | ||
{ | ||
private $success = false; | ||
|
||
public function testExtensionLoaded() | ||
{ | ||
$this->assertTrue(extension_loaded('cassandra')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class EvTest extends TestCase | ||
{ | ||
private $success = false; | ||
|
||
public function testExtensionLoaded() | ||
{ | ||
$this->assertTrue(extension_loaded('ev')); | ||
} | ||
|
||
public function testTimer() | ||
{ | ||
// after 5ms, update success | ||
$w1 = new EvTimer(0.005, 0, function () { | ||
$this->success = true; | ||
}); | ||
Ev::run(); | ||
|
||
// sleep 10ms | ||
usleep(10000); | ||
|
||
Ev::stop(); | ||
|
||
$this->assertTrue($this->success); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class EventTest extends TestCase | ||
{ | ||
private $success = false; | ||
|
||
public function testExtensionLoaded() | ||
{ | ||
$this->assertTrue(extension_loaded('event')); | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
testapps/php72_extensions_legacy/tests/ExtensionsLoadedTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
/** | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ExtensionsLoadedTest extends TestCase | ||
{ | ||
/** | ||
* @dataProvider extensions | ||
*/ | ||
public function testExtensionLoaded($extensionName) | ||
{ | ||
$this->assertTrue(extension_loaded($extensionName)); | ||
} | ||
|
||
public function extensions() | ||
{ | ||
return [ | ||
['amqp'], | ||
['apm'], | ||
['bitset'], | ||
['couchbase'], | ||
['ds'], | ||
['eio'], | ||
['hprose'], | ||
['igbinary'], | ||
['jsond'], | ||
['krb5'], | ||
['lua'], | ||
['lzf'], | ||
['memprof'], | ||
['opencensus'], | ||
['seaslog'], | ||
['stackdriver_debugger'], | ||
['stomp'], | ||
['swoole'], | ||
['sync'], | ||
['tcpwrap'], | ||
['timezonedb'], | ||
['v8js'], | ||
['vips'], | ||
['yaconf'], | ||
['yaf'], | ||
['yaml'] | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class GdTest extends TestCase | ||
{ | ||
public function testExtensionLoaded() | ||
{ | ||
$this->assertTrue(extension_loaded('gd')); | ||
} | ||
|
||
public function testFreetypeSupport() | ||
{ | ||
$this->assertTrue( | ||
gd_info()['FreeType Support'], | ||
'GD should support Freetype' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class GmpTest extends TestCase | ||
{ | ||
public function testExtensionLoaded() | ||
{ | ||
$this->assertTrue(extension_loaded('gmp')); | ||
} | ||
|
||
public function testGcd() | ||
{ | ||
// basic test for greatest common denominator to see if gmp works | ||
$this->assertEquals( | ||
3, | ||
gmp_intval(gmp_gcd("12", "21")) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ImagickTest extends TestCase | ||
{ | ||
private $success = false; | ||
|
||
public function testExtensionLoaded() | ||
{ | ||
$this->assertTrue(extension_loaded('imagick')); | ||
} | ||
|
||
public function testLoadImage() | ||
{ | ||
$image = new Imagick(__DIR__ . '/Blank300.png'); | ||
$dimensions = $image->getImageGeometry(); | ||
$this->assertEquals(300, $dimensions['width']); | ||
$this->assertEquals(1, $dimensions['height']); | ||
} | ||
} |
Oops, something went wrong.