TypeTest::testMethodType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 0
dl 0
loc 13
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace tests;
6
7
use Luke\Types\Blueprint;
8
use PHPUnit\Framework\TestCase;
9
10
class TypeTest extends TestCase
11
{
12
    public function testMethodType()
13
    {
14
        $methodType = new Blueprint;
15
16
        $methodType->id();
17
        $methodType->string('first_name');
18
        $methodType->string('last_name');
19
        $methodType->string('email')->unique();
20
        $methodType->string('password');
21
        $methodType->boolean('active')->default(0);
22
        $methodType->timestamps();
23
24
        $this->assertNotEmpty($methodType->getQuery());
25
    }
26
}
27