Skip to content

Commit

Permalink
refactor unit test (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
norbybaru authored Jan 16, 2024
1 parent f6d0307 commit 99e7b16
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/Unit/PayloadBuilderUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ public function test_it_has_initialized_correctly()
'DOUBLE'
);

try {
$metric = $payloadBuilder->toArray(true);
} catch (\Exception $e) {
$this->fail($e->getMessage());
}
$metric = $payloadBuilder->toArray(true);

$this->assertIsArray($metric);
$this->assertArrayHasKey('MeasureName', $metric);
Expand All @@ -33,7 +29,7 @@ public function test_it_has_initialized_correctly()
$this->assertArrayHasKey('Dimensions', $metric);

$this->assertEquals('test', $metric['MeasureName']);
$this->assertEquals('1', $metric['MeasureValue']);
$this->assertEquals(1, $metric['MeasureValue']);
$this->assertEquals('DOUBLE', $metric['MeasureValueType']);
$this->assertEquals("1704988157000", $metric['Time']);
$this->assertEmpty($metric['Dimensions']);
Expand Down

0 comments on commit 99e7b16

Please sign in to comment.