Completed
Push — master ( 9c4ce9...109946 )
by Jivesh
10:33
created

SendTest::testFailedSlackRequestWithEmptyMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Gahlawat\Slack\Tests\Unit;
4
5
use Slack;
6
use Gahlawat\Slack\Tests\TestCase;
7
8
class SendTest extends TestCase
9
{
10
    /**
11
     * @expectedException ArgumentCountError
12
     */
13
    public function testFailedSlackRequestWithEmptyMessage()
14
    {
15
    	Slack::send();
16
    }
17
18
    public function testFailedSlackRequestWithWrongEndpoint()
19
    {
20
        // $this->expectException(\Exception::class);
0 ignored issues
show
Unused Code Comprehensibility introduced by
60% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
21
        $response = Slack::send('hi');
22
23
        $this->assertEquals(null, $response);
24
    }
25
26
    public function testSuccessfulSlackRequest()
27
    {
28
    	config(['slack.incoming-webhook' => env('SAMPLE_WEBHOOK')]);
29
30
    	$response = Slack::send('hi');
31
32
    	$this->assertEquals(200, $response->getStatusCode());
33
    }
34
}
35