File tree Expand file tree Collapse file tree 2 files changed +19
-17
lines changed
Expand file tree Collapse file tree 2 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ public function setup()
1414 $ this ->setUpDatabase ();
1515 }
1616
17- // protected function getPackageProviders($app)
18- // {
19- // return [
20- // \Thecodework\TwoFactorAuthentication\TwoFactorAuthenticationServiceProvider::class,
21- // ];
22- // }
17+ protected function getPackageProviders ($ app )
18+ {
19+ return [
20+ \Thecodework \TwoFactorAuthentication \TwoFactorAuthenticationServiceProvider::class,
21+ ];
22+ }
2323
2424 protected function seedUserDetails ()
2525 {
Original file line number Diff line number Diff line change 22
33namespace Thecodework \TwoFactorAuthentication \Tests ;
44
5+ use Illuminate \Http \Request ;
6+ use Illuminate \Support \Facades \Schema ;
7+ use Thecodework \TwoFactorAuthentication \Http \Controllers \TwoFactorAuthenticationController ;
8+
59class TwoFactorAuthenticationTest extends BaseTestCase
610{
7- /**
8- * Test Users count after inserting one row.
9- *
10- * @test
11- */
12- public function getUsers ()
11+ protected $ user ;
12+
13+ public function testUserId ()
1314 {
14- $ this ->assertEquals (\DB ::table ('users ' )->count (), 1 );
15+ $ this ->user = \DB ::table ('users ' )->first ();
16+ $ this ->assertEquals (1 , $ this ->user ->id );
1517 }
1618
17- protected function getPackageProviders ( $ app )
19+ public function testIfColumnExists ( )
1820 {
19- return [
20- 'Thecodework\TwoFactorAuthentication\TwoFactorAuthenticationServiceProvider ' ,
21- ];
21+ $ this ->assertTrue (Schema::hasColumn (config ('2fa-config.table ' ), 'two_factor_secret_key ' ));
22+ $ this ->assertTrue (Schema::hasColumn (config ('2fa-config.table ' ), 'is_two_factor_enabled ' ));
2223 }
24+
2325}
You can’t perform that action at this time.
0 commit comments