Skip to content

Commit

Permalink
test: service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
abrahamgreyson committed Jan 10, 2024
1 parent b6a5ada commit 3e176b6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/ServiceProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<?php

namespace Abe\ChineseRegionsForLaravel\Tests;

test('service provider is discovered', function () {
$providers = config('app.providers');
expect($providers)->toContain('Abe\ChineseRegionsForLaravel\ChineseRegionsServiceProvider');
});

test('commands are registered', function () {
$commands = app('Illuminate\Contracts\Console\Kernel')->all();
expect($commands)->toHaveKey('chinese-regions:import');
});

test('migration is registered', function () {
$path = app('migrator')->paths();
$names = array_map(function ($path) {
return basename($path);
}, $path);
expect($names)->toContain('create_chinese_regions_table.php');
});

0 comments on commit 3e176b6

Please sign in to comment.