Skip to content

Commit 34d91d2

Browse files
committed
Unit testing
1 parent 2da32cd commit 34d91d2

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

.env.testing

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/DbFakerMaskTest.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,24 @@
77
class DbFakerMaskTest extends TestCase
88
{
99

10+
/**
11+
*
12+
* @var DbFakerMask
13+
*/
1014
protected $dbFakerMask;
1115

16+
/**
17+
*
18+
* {@inheritdoc}
19+
* @see \PHPUnit\Framework\TestCase::setUp()
20+
*/
1221
protected function setUp()
1322
{
1423
/**
1524
*
1625
* @var \Illuminate\Foundation\Application $app
1726
*/
1827
$app = require __DIR__ . '/bootstrap/app.php';
19-
$app->loadEnvironmentFrom('.env.testing');
2028
$app->make(\Tests\Kernel::class)->bootstrap();
2129

2230
$faker = \Faker\Factory::create();
@@ -25,8 +33,8 @@ protected function setUp()
2533
'chunk' => 20,
2634
'tables' => [
2735
'users' => [
28-
'firstname' => 'firstName',
29-
'lastname' => 'lastName'
36+
'first_name' => 'firstName',
37+
'last_name' => 'lastName'
3038
]
3139
]
3240
];
@@ -39,10 +47,10 @@ public function testConstructor()
3947
$this->assertTrue($this->dbFakerMask instanceof DbFakerMask);
4048
}
4149

42-
// public function testMasking()
43-
// {
44-
// $this->dbFakerMask->mask();
50+
public function testMasking()
51+
{
52+
$this->dbFakerMask->mask();
4553

46-
// $this->assertTrue($this->dbFakerMask instanceof DbFakerMask);
47-
// }
54+
$this->assertTrue($this->dbFakerMask instanceof DbFakerMask);
55+
}
4856
}
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)