Skip to content

Commit

Permalink
fix test command feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ilvalerione committed Mar 17, 2020
1 parent e170cee commit b14479f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Commands/TestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public function handle(Repository $config)
inspector()->addSegment(function ($segment) use ($config) {
sleep(1);

$this->info(!empty($config->get('inspector.key'))
? '✅ Inspector key installed.'
: '❌ Inspector key not specified. Make sure you specify a value in the `key` field of the `inspector` config file.');
!empty($config->get('inspector.key'))
? $this->info('✅ Inspector key installed.')
: $this->warn('❌ Inspector key not specified. Make sure you specify a value in the `key` field of the `inspector` config file.');

$segment->addContext('example payload', ['foo' => 'bar']);
}, 'test', 'Check API key');
Expand All @@ -49,9 +49,9 @@ public function handle(Repository $config)
inspector()->addSegment(function ($segment) use ($config) {
sleep(1);

$this->info($config->get('inspector.enable')
? '✅ Inspector is enabled.'
: '❌ Inspector is actually disabled, turn to true the `enable` field of the `inspector` config file.');
$config->get('inspector.enable')
? $this->info('✅ Inspector is enabled.')
: $this->warn('❌ Inspector is actually disabled, turn to true the `enable` field of the `inspector` config file.');

$segment->addContext('another payload', ['foo' => 'bar']);
}, 'test', 'Check if Inspector is enabled');
Expand All @@ -60,9 +60,9 @@ public function handle(Repository $config)
inspector()->addSegment(function ($segment) use ($config) {
sleep(1);

$this->info(function_exists('curl_version')
? '✅ CURL extension is enabled.'
: '❌ CURL is actually disabled so your app could not be able to send data to Inspector.');
function_exists('curl_version')
? $this->info('✅ CURL extension is enabled.')
: $this->warn('❌ CURL is actually disabled so your app could not be able to send data to Inspector.');

$segment->addContext('another payload', ['foo' => 'bar']);
}, 'test', 'Check CURL extension');
Expand All @@ -75,7 +75,7 @@ public function handle(Repository $config)
// Another demo transaction
inspector()->startTransaction($this->signature)
->start(now()->subMinutes(30)->getTimestamp())
->end(now()->subMinutes(29)->getTimestamp())
->end(1000)
->setResult('success');

$this->line('Done! Explore your data on https://app.inspector.dev');
Expand Down

0 comments on commit b14479f

Please sign in to comment.