Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ php:
- "5.5"
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- nightly

matrix:
allow_failures:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: nightly

script:
- phpunit -c phpunit.xml Tests/
- vendor/bin/phpunit -c phpunit.xml Tests/
4 changes: 2 additions & 2 deletions Tests/Current_Session_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class Current_Session_Test extends TestCase
private $sessionCreatedTime;
private $sessionLastRenewedTime;

protected function setUp()
protected function setUp(): void
{
$this->sessionId = \ApplicationInsights\Channel\Contracts\Utils::returnGuid();
$this->sessionCreatedTime = time();
$this->sessionLastRenewedTime = time() - 10000;
Utils::setSessionCookie($this->sessionId, $this->sessionCreatedTime, $this->sessionLastRenewedTime);
}

protected function tearDown()
protected function tearDown(): void
{
Utils::clearSessionCookie();
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/Current_User_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ class Current_User_Test extends TestCase
{
private $userId;

protected function setUp()
protected function setUp(): void
{
$this->userId = \ApplicationInsights\Channel\Contracts\Utils::returnGuid();
Utils::setUserCookie($this->userId);
}

protected function tearDown()
protected function tearDown(): void
{
Utils::clearUserCookie();
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Telemetry_Client_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Telemetry_Client_Test extends TestCase
{
private $_telemetryClient;

protected function setUp()
protected function setUp(): void
{
$this->_telemetryClient = new \ApplicationInsights\Telemetry_Client();

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"license": "MIT",
"require": {
"php": ">=5.4.0",
"guzzlehttp/guzzle": ">=5.0 <=6.3.3"
"guzzlehttp/guzzle": "~5|~6"
},
"require-dev": {
"phpunit/phpunit": "~4.8.36",
"phpunit/phpunit": "~5|~6|~7|~8|~9",
"evert/phpdoc-md" : "~0.0.7"
},
"autoload": {
Expand Down
48 changes: 24 additions & 24 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.3/phpunit.xsd" backupGlobals="true" backupStaticAttributes="false" bootstrap="Tests/Bootstrap.php">
bootstrap="/Tests/Bootstrap.php"
cacheTokens="false"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
printerClass="PHPUnit_TextUI_ResultPrinter"
<!--printerFile="/path/to/ResultPrinter.php"-->
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
<!--testSuiteLoaderFile="/path/to/StandardTestSuiteLoader.php"-->
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
strict="false"
verbose="true"
<!-- ... --></phpunit>
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.3/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="Tests/Bootstrap.php"
cacheTokens="false"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
verbose="true"
>
</phpunit>