Skip to content

Commit

Permalink
Added test for merging configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilari Moragrega committed Mar 9, 2018
1 parent 790ab99 commit b6bced7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/MonitorFactorySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,25 @@ function it_can_built_an_working_monitor(LoggerInterface $logger)

$monitor->shouldBeAnInstanceOf(Monitor::class);
}

function it_can_built_an_working_monitor_from_half_config(LoggerInterface $logger)
{
$monitor = $this->create([
'hostname' => 'fooserver',
'default_tags' => ['foo' => 'bar'],
'logger' => [
'instance' => $logger,
'debug' => true,
'metrics' => true,
'events' => true,
],
'datadog' => [
'metrics' => true,
'events' => true,
'host' => '10.0.0.1'
],
]);

$monitor->shouldBeAnInstanceOf(Monitor::class);
}
}

0 comments on commit b6bced7

Please sign in to comment.