testCheckMethodReturnsCheckObject()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Copyright (c) 2019 - present
4
 * laravel-updown - UpDownCheckTest.php
5
 * author: Roberto Belotti - [email protected]
6
 * web : robertobelotti.com, github.com/biscolab
7
 * Initial version created on: 28/2/2019
8
 * MIT license: https://github.com/biscolab/laravel-updown/blob/master/LICENSE
9
 */
10
11
namespace Biscolab\LaravelUpDown\Tests;
12
13
use Biscolab\UpDown\Objects\Check;
14
15
/**
16
 * Class UpDownCheckTest
17
 * @package Biscolab\LaravelUpDown\Tests
18
 */
19
class UpDownCheckTest extends TestCase
20
{
21
22
    /**
23
     * @test
24
     */
25
    public function testCheckMethodReturnsCheckObject()
26
    {
27
28
        $this->assertInstanceOf(Check::class, updown()->Check());
0 ignored issues
show
Bug introduced by
The method Check() does not exist on Biscolab\LaravelUpDown\UpDownBuilder. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        $this->assertInstanceOf(Check::class, updown()->/** @scrutinizer ignore-call */ Check());
Loading history...
29
    }
30
31
    /**
32
     * @test
33
     */
34
    public function testCheckMethodWithTokenReturnsCheckObjectWithTokenAsId()
35
    {
36
        /** @var Check $check */
37
        $check = updown()->Check(env('DEFAULT_TOKEN', 'DEFAULT_TOKEN'));
38
        $this->assertEquals(env('DEFAULT_TOKEN', 'DEFAULT_TOKEN'), $check->getId());
39
    }
40
41
    /**
42
     * @return void
43
     */
44
    public function setUp(): void
45
    {
46
47
        parent::setUp(); // TODO: Change the autogenerated stub
48
49
    }
50
}