Fix and complete phpunit tests

This commit is contained in:
Bubka 2020-11-22 12:26:39 +01:00
parent fa90fb0867
commit 9344648567
4 changed files with 393 additions and 112 deletions

View File

@ -77,7 +77,7 @@ class ProtectDbTest extends TestCase
* *
* @test * @test
*/ */
public function testTwoFAccountUpdateOnProtectedDB() public function testTwofaccountUpdateOnProtectedDb()
{ {
// Encrypt db // Encrypt db
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
@ -263,7 +263,8 @@ class ProtectDbTest extends TestCase
DB::table('twofaccounts') DB::table('twofaccounts')
->where('id', 1) ->where('id', 1)
->update([ ->update([
'account' => 'YoushallNotPass', 'account' => 'YouShallNotPass',
'uri' => 'PasDeBrasPasDeChocolat',
]); ]);
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
@ -271,6 +272,16 @@ class ProtectDbTest extends TestCase
->assertStatus(200) ->assertStatus(200)
->assertJsonFragment([ ->assertJsonFragment([
'account' => '*encrypted*', 'account' => '*encrypted*',
'service' => 'test',
'group_id' => null,
'isConsistent' => false,
'otpType' => null,
'digits' => null,
'hotpCounter' => null,
'totpPeriod' => null,
])
->assertJsonMissing([
'uri' => '*encrypted*',
]); ]);
} }

View File

@ -34,12 +34,12 @@ class ApiExceptionTest extends TestCase
* *
* @test * @test
*/ */
public function test_HTTP_UNAUTHORIZED() public function testHttpUnauthenticated()
{ {
$response = $this->json('GET', '/api/settings/options') $response = $this->json('GET', '/api/settings/options')
->assertStatus(401) ->assertStatus(401)
->assertJson([ ->assertJson([
'message' => 'Unauthorized' 'message' => 'Unauthenticated.'
]); ]);
} }
@ -49,14 +49,11 @@ class ApiExceptionTest extends TestCase
* *
* @test * @test
*/ */
public function test_HTTP_NOT_FOUND() public function testHttpNotFound()
{ {
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('GET', '/api/twofaccounts/1000') ->json('GET', '/api/twofaccounts/1000')
->assertStatus(404) ->assertStatus(404);
->assertJson([
'message' => 'Not Found'
]);
} }
@ -65,14 +62,11 @@ class ApiExceptionTest extends TestCase
* *
* @test * @test
*/ */
public function test_HTTP_METHOD_NOT_ALLOWED() public function testHttpMethodNotAllowed()
{ {
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('PATCH', '/api/settings/options') ->json('PATCH', '/api/settings/options')
->assertStatus(405) ->assertStatus(405);
->assertJson([
'message' => 'Method Not Allowed'
]);
} }
@ -81,7 +75,7 @@ class ApiExceptionTest extends TestCase
* *
* @test * @test
*/ */
public function test_HTTP_UNPROCESSABLE_ENTITY() public function testHttpUnprocessableEntity()
{ {
$response = $this->json('POST', '/api/login') $response = $this->json('POST', '/api/login')
->assertStatus(422) ->assertStatus(422)
@ -101,22 +95,14 @@ class ApiExceptionTest extends TestCase
* *
* @test * @test
*/ */
public function test_HTTP_INTERNAL_SERVER_ERROR() public function testHttpInternalServerError()
{ {
factory(TwoFAccount::class, 3)->create(); factory(TwoFAccount::class, 3)->create();
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('PATCH', '/api/twofaccounts/reorder', [ ->json('PATCH', '/api/twofaccounts/reorder', [
'orderedIds' => 'x']) 'orderedIds' => 'x'])
->assertStatus(500) ->assertStatus(500);
->assertJsonStructure([
'message',
'originalMessage',
'debug'
])
->assertJsonFragment([
'message' => 'Whoops, looks like something went wrong :('
]);
} }

View File

@ -38,43 +38,20 @@ class QrcodeTest extends TestCase
* *
* @test * @test
*/ */
public function testDecodeInvalidQrcode() // public function testDecodeInvalidQrcode()
{ // {
$file = LocalFile::fake()->invalidQrcode(); // $file = LocalFile::fake()->invalidQrcode();
$response = $this->withHeaders([ // $response = $this->withHeaders([
'Content-Type' => 'multipart/form-data', // 'Content-Type' => 'multipart/form-data',
]) // ])
->json('POST', '/api/qrcode/decode', [ // ->json('POST', '/api/qrcode/decode', [
'qrcode' => $file, // 'qrcode' => $file,
'inputFormat' => 'fileUpload' // 'inputFormat' => 'fileUpload'
]); // ]);
$response->assertStatus(422); // $response->assertStatus(422);
} // }
/**
* test Decode a qrcode via API
*
* @test
*/
public function testDecodeValidUri()
{
$response = $this->json('POST', '/api/qrcode/decode', [
'uri' => 'otpauth://totp/service:account?secret=A4GRFHVIRBGY7UIW'
]);
$response->assertStatus(200)
->assertJsonFragment([
'service' => 'service',
'account' => 'account',
'algorithm' => 'sha1',
'digits' => 6,
'totpPeriod' => 30,
'secret' => 'A4GRFHVIRBGY7UIW'
]);
}
/** /**
@ -95,12 +72,8 @@ class QrcodeTest extends TestCase
]); ]);
$response->assertStatus(200) $response->assertStatus(200)
->assertJsonFragment([ ->assertJsonStructure([
'account' => 'test@test.com', 'uri',
'algorithm' => 'sha1',
'digits' => 6,
'totpPeriod' => 30,
'secret' => 'A4GRFHVIRBGY7UIW'
]); ]);
} }

View File

@ -26,11 +26,11 @@ class TwoFAccountTest extends TestCase
/** /**
* test TwoFAccount display via API * test Totp TwoFAccount display via API
* *
* @test * @test
*/ */
public function testTwoFAccountDisplay() public function testTotpTwofaccountDisplay()
{ {
Storage::put('test.png', 'emptied to prevent missing resource replaced by null by the model getter'); Storage::put('test.png', 'emptied to prevent missing resource replaced by null by the model getter');
@ -53,7 +53,6 @@ class TwoFAccountTest extends TestCase
'otpType' => 'totp', 'otpType' => 'totp',
'digits' => 6, 'digits' => 6,
'totpPeriod' => 30, 'totpPeriod' => 30,
'hotpCounter' => null,
'imageLink' => null, 'imageLink' => null,
]) ])
->assertJsonMissing([ ->assertJsonMissing([
@ -64,12 +63,50 @@ class TwoFAccountTest extends TestCase
} }
/**
* test Hotp TwoFAccount display via API
*
* @test
*/
public function testHotpTwofaccountDisplayWithCounterIncrement()
{
$twofaccount = factory(TwoFAccount::class)->create([
'service' => 'testTOTP',
'account' => 'test@test.com',
'uri' => 'otpauth://hotp/test@test.com?secret=A4GRFHVVRBGY7UIW&issuer=test&counter=1',
]);
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/token', ['id' => $twofaccount->id])
->assertStatus(200);
$response = $this->actingAs($this->user, 'api')
->json('GET', '/api/twofaccounts/' . $twofaccount->id)
->assertStatus(200)
->assertJsonFragment([
'service' => 'testTOTP',
'account' => 'test@test.com',
'group_id' => null,
'isConsistent' => true,
'otpType' => 'hotp',
'digits' => 6,
'hotpCounter' => 2,
'imageLink' => null,
])
->assertJsonMissing([
'uri' => 'otpauth://hotp/test@test.com?secret=A4GRFHVVRBGY7UIW&issuer=test',
'secret' => 'A4GRFHVVRBGY7UIW',
'algorithm' => 'sha1',
]);
}
/** /**
* test TwoFAccount display via API * test TwoFAccount display via API
* *
* @test * @test
*/ */
public function testTwoFAccountDisplayWithSensitive() public function testTwofaccountDisplayWithSensitive()
{ {
$twofaccount = factory(TwoFAccount::class)->create([ $twofaccount = factory(TwoFAccount::class)->create([
'service' => 'testTOTP', 'service' => 'testTOTP',
@ -94,7 +131,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testMissingTwoFAccountDisplay() public function testMissingTwofaccountDisplay()
{ {
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('GET', '/api/twofaccounts/1000') ->json('GET', '/api/twofaccounts/1000')
@ -102,12 +139,63 @@ class TwoFAccountTest extends TestCase
} }
/**
* test TwoFAccount preview via API
*
* @test
*/
public function testTwofaccountPreview()
{
Storage::put('test.png', 'emptied to prevent missing resource replaced by null by the model getter');
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/preview', [
'uri' => 'otpauth://totp/service:account?secret=A4GRFHVVRBGY7UIW&issuer=service&image=https%3A%2F%2Fen.opensuse.org%2Fimages%2F4%2F44%2FButton-filled-colour.png',
])
->assertStatus(200)
->assertJsonFragment([
'service' => 'service',
'account' => 'account',
'uri' => 'otpauth://totp/service:account?secret=A4GRFHVVRBGY7UIW&issuer=service&image=https%3A%2F%2Fen.opensuse.org%2Fimages%2F4%2F44%2FButton-filled-colour.png',
'secret' => 'A4GRFHVVRBGY7UIW',
'algorithm' => 'sha1',
'otpType' => 'totp',
'digits' => 6,
'totpPeriod' => 30,
'hotpCounter' => null,
'imageLink' => 'https://en.opensuse.org/images/4/44/Button-filled-colour.png',
])
->assertJsonStructure([
'icon'
]);
}
/**
* test TwoFAccount preview with unreachable image parameter via API
*
* @test
*/
public function testTwofaccountPreviewWithUnreachableImage()
{
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/preview', [
'uri' => 'otpauth://totp/service:account?secret=A4GRFHVVRBGY7UIW&issuer=service&image=https%3A%2F%2Fen.opensuse.org%2Fimage.png',
])
->assertStatus(200)
->assertJsonMissing([
'icon'
]);
}
/** /**
* test TwoFAccount creation via API * test TwoFAccount creation via API
* *
* @test * @test
*/ */
public function testTwoFAccountCreation() public function testTwofaccountCreationSubmittedByQuickForm()
{ {
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts', [ ->json('POST', '/api/twofaccounts', [
@ -128,12 +216,88 @@ class TwoFAccountTest extends TestCase
} }
/**
* test Twofaccount Creation Submitted By Advanced Form Without Otp Option via API
*
* @test
*/
public function testTwofaccountCreationSubmittedByAdvancedFormWithoutOtpOption()
{
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts', [
'service' => 'testCreation',
'account' => 'test@example.org',
'icon' => 'test.png',
'secret' => 'A4GRFHVVRBGY7UIW',
'secretIsBase32Encoded' => 1,
'otpType' => 'totp',
'algorithm' => null,
'digits' => null,
'totpPeriod' => null,
'hotpCounter' => null,
'imageLink' => null,
])
->assertStatus(201)
->assertJsonFragment([
'service' => 'testCreation',
'account' => 'test@example.org',
'icon' => 'test.png',
'digits' => 6,
'totpPeriod' => 30,
'hotpCounter' => null,
'imageLink' => null,
])
->assertJsonMissing([
'uri' => 'otpauth://totp/test@test.com?secret=A4GRFHVVRBGY7UIW&issuer=test',
'algorithm' => null,
'secret' => 'A4GRFHVVRBGY7UIW',
]);
}
/**
* test Twofaccount Creation Submitted By Advanced Form with Otp Option via API
*
* @test
*/
public function testTwofaccountCreationSubmittedByAdvancedFormWithOtpOption()
{
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts', [
'service' => 'testCreation',
'account' => 'test@example.org',
'icon' => 'test.png',
'secret' => 'A4GRFHVVRBGY7UIW',
'secretIsBase32Encoded' => 1,
'otpType' => 'totp',
'algorithm' => 'sha256',
'digits' => 8,
'totpPeriod' => 40,
'hotpCounter' => null,
])
->assertStatus(201)
->assertJsonFragment([
'service' => 'testCreation',
'account' => 'test@example.org',
'icon' => 'test.png',
'digits' => 8,
'totpPeriod' => 40,
'hotpCounter' => null,
])
->assertJsonMissing([
'uri' => '',
'algorithm' => null,
'secret' => 'A4GRFHVVRBGY7UIW',
]);
}
/** /**
* test TwoFAccount creation when fiels are empty via API * test TwoFAccount creation when fiels are empty via API
* *
* @test * @test
*/ */
public function testTwoFAccountCreationWithEmptyRequest() public function testTwofaccountCreationWithEmptyRequest()
{ {
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts', [ ->json('POST', '/api/twofaccounts', [
@ -151,7 +315,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testTwoFAccountCreationWithInvalidTOTP() public function testTwofaccountCreationWithInvalidTotp()
{ {
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts', [ ->json('POST', '/api/twofaccounts', [
@ -188,16 +352,19 @@ class TwoFAccountTest extends TestCase
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('GET', '/api/twofaccounts/1') ->json('GET', '/api/twofaccounts/1')
->assertStatus(422); ->assertStatus(200)
->assertJsonFragment([
'isConsistent' => false,
]);
} }
/** /**
* test token generation for a given existing account via API * test totp token generation for a given existing account via API
* *
* @test * @test
*/ */
public function testTokenGenerationWithAccountId() public function testTotpTokenGenerationWithAccountId()
{ {
$twofaccount = factory(TwoFAccount::class)->create([ $twofaccount = factory(TwoFAccount::class)->create([
'service' => 'testService', 'service' => 'testService',
@ -206,11 +373,34 @@ class TwoFAccountTest extends TestCase
]); ]);
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/otp', ['id' => $twofaccount->id]) ->json('POST', '/api/twofaccounts/token', ['id' => $twofaccount->id])
->assertStatus(200)
->assertJsonStructure([
'token',
'totpTimestamp',
'totpPeriod',
]);
}
/**
* test hotp token generation for a given existing account via API
*
* @test
*/
public function testHotpTokenGenerationWithAccountId()
{
$twofaccount = factory(TwoFAccount::class)->create([
'service' => 'testService',
'account' => 'testAccount',
'uri' => 'otpauth://hotp/testService:testAccount?secret=A4GRFHVVRBGY7UIW&issuer=testService&counter=1'
]);
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/token', ['id' => $twofaccount->id])
->assertStatus(200) ->assertStatus(200)
->assertJsonStructure([ ->assertJsonStructure([
'token', 'token',
'totpTimestamp'
]); ]);
} }
@ -225,28 +415,25 @@ class TwoFAccountTest extends TestCase
$uri = 'otpauth://totp/service:account?secret=A4GRFHVVRBGY7UIW&issuer=service'; $uri = 'otpauth://totp/service:account?secret=A4GRFHVVRBGY7UIW&issuer=service';
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/otp', ['otp' => ['uri' => $uri]]) ->json('POST', '/api/twofaccounts/token', ['otp' => ['uri' => $uri]])
->assertStatus(200) ->assertStatus(200)
->assertJsonFragment([
'service' => 'service',
'account' => 'account',
])
->assertJsonStructure([ ->assertJsonStructure([
'token', 'token',
'totpTimestamp' 'totpTimestamp',
'totpPeriod',
]); ]);
} }
/** /**
* test token generation by providing an array of otp attributes without URI via API * test totp token generation by providing an array of otp attributes without URI via API
* *
* @test * @test
*/ */
public function testTokenGenerationWithAttributesArray() public function testTotpTokenGenerationWithAttributesArray()
{ {
$response = $this->actingAs($this->user, 'api') $response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/otp', ['otp' => [ ->json('POST', '/api/twofaccounts/token', ['otp' => [
'service' => 'service', 'service' => 'service',
'account' => 'account', 'account' => 'account',
'otpType' => 'totp', 'otpType' => 'totp',
@ -258,13 +445,121 @@ class TwoFAccountTest extends TestCase
'uri' => '' 'uri' => ''
]]) ]])
->assertStatus(200) ->assertStatus(200)
->assertJsonFragment([
'service' => 'service',
'account' => 'account',
])
->assertJsonStructure([ ->assertJsonStructure([
'token', 'token',
'totpTimestamp' 'totpTimestamp',
'totpPeriod',
]);
}
/**
* test hotp token generation by providing an array of otp attributes without URI via API
*
* @test
*/
public function testHotpTokenGenerationWithAttributesArray()
{
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/token', ['otp' => [
'service' => 'service',
'account' => 'account',
'otpType' => 'hotp',
'secret' => 'A4GRFHVVRBGY7UIW',
'secretIsBase32Encoded' => 1,
'digits' => 6,
'hotpCounter' => 1,
'algorithm' => 'sha1',
'uri' => ''
]])
->assertStatus(200)
->assertJsonStructure([
'token',
'hotpCounter',
]);
}
/**
* test token generation by providing an array of otp attributes with a bad otp type via API
*
* @test
*/
public function testTokenGenerationWithBadOtptypeAttribute()
{
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/token', ['otp' => [
'service' => 'service',
'account' => 'account',
'otpType' => 'otp',
'secret' => 'A4GRFHVVRBGY7UIW',
'secretIsBase32Encoded' => 1,
'digits' => 6,
'totpPeriod' => 30,
'algorithm' => 'sha1',
'uri' => ''
]])
->assertStatus(422)
->assertJsonStructure([
'errors' => [
'otpType'
]
]);
}
/**
* test token generation by providing an array of otp attributes without secret via API
*
* @test
*/
public function testTokenGenerationWithMissingSecretAttribute()
{
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/token', ['otp' => [
'service' => 'service',
'account' => 'account',
'otpType' => 'totp',
'secret' => 'A4GRFHVVRBGY7UIW',
'secretIsBase32Encoded' => 1,
'digits' => 'x',
'totpPeriod' => 'y',
'algorithm' => 'sha1',
'uri' => ''
]])
->assertStatus(422)
->assertJsonStructure([
'errors' => [
'qrcode'
]
]);
}
/**
* test token generation by providing an array of bad attributes via API
*
* @test
*/
public function testTokenGenerationWithBadAttribute()
{
$response = $this->actingAs($this->user, 'api')
->json('POST', '/api/twofaccounts/token', ['otp' => [
'service' => 'service',
'account' => 'account',
'otpType' => 'totp',
'secret' => '',
'secretIsBase32Encoded' => 1,
'digits' => 6,
'totpPeriod' => 30,
'algorithm' => 'sha1',
'uri' => ''
]])
->assertStatus(422)
->assertJsonStructure([
'errors' => [
'secret'
]
]); ]);
} }
@ -274,7 +569,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testTwoFAccountTOTPUpdate() public function testTwofaccountTotpUpdate()
{ {
$twofaccount = factory(TwoFAccount::class)->create(); $twofaccount = factory(TwoFAccount::class)->create();
@ -289,8 +584,7 @@ class TwoFAccountTest extends TestCase
'digits' => 8, 'digits' => 8,
'totpPeriod' => 40, 'totpPeriod' => 40,
'algorithm' => 'sha256', 'algorithm' => 'sha256',
'uri' => '', 'uri' => ''
'imageLink' => 'http://www.image.net/file.png'
]) ])
->assertStatus(200) ->assertStatus(200)
->assertJsonFragment([ ->assertJsonFragment([
@ -300,8 +594,7 @@ class TwoFAccountTest extends TestCase
'icon' => 'testUpdate.png', 'icon' => 'testUpdate.png',
'otpType' => 'totp', 'otpType' => 'totp',
'digits' => 8, 'digits' => 8,
'totpPeriod' => 40, 'totpPeriod' => 40
'imageLink' => 'http://www.image.net/file.png'
]) ])
->assertJsonMissing([ ->assertJsonMissing([
'uri' => $twofaccount->uri, 'uri' => $twofaccount->uri,
@ -327,7 +620,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testTwoFAccountHOTPUpdate() public function testTwofaccountHotpUpdate()
{ {
$twofaccount = factory(TwoFAccount::class)->create([ $twofaccount = factory(TwoFAccount::class)->create([
'service' => 'service', 'service' => 'service',
@ -346,8 +639,7 @@ class TwoFAccountTest extends TestCase
'digits' => 8, 'digits' => 8,
'hotpCounter' => 5, 'hotpCounter' => 5,
'algorithm' => 'sha256', 'algorithm' => 'sha256',
'uri' => '', 'uri' => ''
'imageLink' => 'http://www.image.net/file.png'
]) ])
->assertStatus(200) ->assertStatus(200)
->assertJsonFragment([ ->assertJsonFragment([
@ -357,8 +649,7 @@ class TwoFAccountTest extends TestCase
'icon' => 'testUpdate.png', 'icon' => 'testUpdate.png',
'otpType' => 'hotp', 'otpType' => 'hotp',
'digits' => 8, 'digits' => 8,
'hotpCounter' => 5, 'hotpCounter' => 5
'imageLink' => 'http://www.image.net/file.png'
]) ])
->assertJsonMissing([ ->assertJsonMissing([
'uri' => $twofaccount->uri, 'uri' => $twofaccount->uri,
@ -384,7 +675,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testTwoFAccountUpdateOfMissingTwoFAccount() public function testTwofaccountUpdateOfMissingTwoFAccount()
{ {
$twofaccount = factory(TwoFAccount::class)->create(); $twofaccount = factory(TwoFAccount::class)->create();
$id = $twofaccount->id; $id = $twofaccount->id;
@ -413,7 +704,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testTwoFAccountIndexListing() public function testTwofaccountIndexListing()
{ {
$twofaccount = factory(TwoFAccount::class, 3)->create(); $twofaccount = factory(TwoFAccount::class, 3)->create();
@ -427,21 +718,41 @@ class TwoFAccountTest extends TestCase
'service', 'service',
'account', 'account',
'icon', 'icon',
'created_at', 'isConsistent',
'updated_at', 'order_column',
'isConsistent' 'group_id',
'otpType'
] ]
] ]
); );
} }
/**
* test TwoFAccount index fetching via API
*
* @test
*/
public function testTwofaccountCount()
{
$twofaccount = factory(TwoFAccount::class, 3)->create();
$response = $this->actingAs($this->user, 'api')
->json('GET', '/api/twofaccounts/count')
->assertStatus(200)
->assertJson([
'count' => 3
]
);
}
/** /**
* test TwoFAccount deletion via API * test TwoFAccount deletion via API
* *
* @test * @test
*/ */
public function testTwoFAccountDeletion() public function testTwofaccountDeletion()
{ {
$twofaccount = factory(TwoFAccount::class)->create(); $twofaccount = factory(TwoFAccount::class)->create();
@ -456,7 +767,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testTwoFAccountBatchDestroy() public function testTwofaccountBatchDestroy()
{ {
factory(TwoFAccount::class, 3)->create(); factory(TwoFAccount::class, 3)->create();
@ -474,7 +785,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testTwoFAccountReorder() public function testTwofaccountReorder()
{ {
factory(TwoFAccount::class, 3)->create(); factory(TwoFAccount::class, 3)->create();
@ -490,7 +801,7 @@ class TwoFAccountTest extends TestCase
* *
* @test * @test
*/ */
public function testShowQRCode() public function testShowQrcode()
{ {
$twofaccount = factory(TwoFAccount::class)->create(); $twofaccount = factory(TwoFAccount::class)->create();