EloquentConnectionTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testIlluminateConnection() 0 18 1
1
<?php
2
use Illuminate\Database\Schema\Blueprint;
3
4
5
class EloquentConnectionTest extends PHPUnit_Framework_TestCase
6
{
7
8
	/**
9
	 *
10
	 */
11
	public function testIlluminateConnection()
12
	{
13
		Illuminate\Database\Capsule\Manager::schema()->create('test', function (Blueprint $table) {
14
			$table->increments('id');
15
			$table->string('email')->unique();
16
			$table->timestamps();
17
		});
18
19
		\Illuminate\Database\Capsule\Manager::table('test')->insert(
20
			[
21
				'email' => '[email protected]'
22
			]
23
		);
24
25
		$test = \Illuminate\Database\Capsule\Manager::table('test')->first();
26
		$this->assertNotEmpty($test);
27
		\Illuminate\Database\Capsule\Manager::schema()->drop('test');
28
	}
29
}
30