Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #88 from philkra/issue/85
Browse files Browse the repository at this point in the history
bump up ralouphie/getallheaders version
  • Loading branch information
philkra authored Aug 28, 2019
2 parents 02f8701 + b4ddbb1 commit 730e403
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"require" : {
"php" : ">= 7.1",
"guzzlehttp/guzzle": "6.*",
"ralouphie/getallheaders": "2.0.5",
"ralouphie/getallheaders": "3.*",
"ext-curl" : "*",
"ext-json": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Events/EventBean.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function __construct(array $contexts, ?Transaction $parent = null)
$this->contexts = array_merge($this->contexts, $contexts);

// Get current Unix timestamp with seconds
$this->timestamp = (int)(microtime(true) * 1000000);
$this->timestamp = round(microtime(true) * 1000000);

// Set Parent Transaction
if ($parent !== null) {
Expand Down
4 changes: 2 additions & 2 deletions tests/Events/TransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ final class TransactionTest extends TestCase {
* @covers \PhilKra\Events\Transaction::setTransactionName
*/
public function testParentConstructor() {
$now = microtime(true) * 1000000;

$name = 'testerus-grandes';
$transaction = new Transaction($name, []);

$this->assertEquals($name, $transaction->getTransactionName());
$this->assertNotNull($transaction->getId());
$this->assertNotNull($transaction->getTraceId());
$this->assertNotNull($transaction->getTimestamp());

$now = round(microtime(true) * 1000000);
$this->assertGreaterThanOrEqual($transaction->getTimestamp(), $now);
}

Expand Down

0 comments on commit 730e403

Please sign in to comment.