-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathIdentifyTest.php
68 lines (58 loc) · 1.54 KB
/
IdentifyTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
namespace Unicodeveloper\Identify\Test;
use PHPUnit\Framework\TestCase;
use Sinergi\BrowserDetector\{ Browser, Device, Language, Os };
use Unicodeveloper\Identify\Identify;
class IdentifyTest extends TestCase
{
/**
* Identify Object
* @var Identify
*/
protected $identify;
protected function setUp() : void
{
parent::setUp();
$this->identify = new Identify();
}
/**
* Test if Identify can be constructed
*
*/
public function testIdentifyCanBeConstructed()
{
$this->assertInstanceOf(Identify::class, $this->identify);
}
/**
* Test if Os is constructed on Identify Object created
*
*/
public function testOSIsInitializedOnIdentifyConstruction()
{
$this->assertInstanceOf(Os::class, $this->identify->os());
}
/**
* Test if Device is constructed on Identify Object created
*
*/
public function testDeviceIsInitializedOnIdentifyConstruction()
{
$this->assertInstanceOf(Device::class, $this->identify->device());
}
/**
* Test if Os is constructed on Identify Object created
*
*/
public function testBrowserIsInitializedOnIdentifyConstruction()
{
$this->assertInstanceOf(Browser::class, $this->identify->browser());
}
/**
* Test if Language is constructed on Identify Object created
*
*/
public function testLanguageIsInitializedOnIdentifyConstruction()
{
$this->assertInstanceOf(Language::class, $this->identify->lang());
}
}