Skip to content

Commit

Permalink
Modify tests
Browse files Browse the repository at this point in the history
Add unit file in directory,
Fix feature test.
  • Loading branch information
Mohammadreza-73 committed Jan 19, 2024
1 parent aa57a81 commit 7a25745
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
{
"name": "Mohammadreza",
"email": "[email protected]",
"homepage": "https://m-rahimi.ir",
"homepage": "https://github.com/Mohammadreza-73/Lara-Health",
"role": "Developer"
}
],
"license": "MIT",
"require": {},
"require-dev": {
"orchestra/testbench": "^7.17"
},
"license": "MIT",
"require": {},
"autoload": {
"psr-4": {
"LaravelHealth\\": "src/"
Expand All @@ -24,6 +24,9 @@
"autoload-dev": {
"LaravelHealth\\Tests\\": "tests/"
},
"scripts": {
"test": "vendor/bin/phpunit"
},
"extra": {
"laravel": {
"providers": [
Expand Down
11 changes: 6 additions & 5 deletions tests/Feature/PackageSampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ class PackageSampleTest extends TestCase
{
public function testConfigFile()
{
$this->assertFileExists(__DIR__.'/../config/health.php', 'فایل کانفیگ وجود ندارد');
$this->assertFileExists(dirname(__DIR__).'/../config/health.php', 'File not exists');

$array = include __DIR__.'/../config/health.php';
$this->assertArrayHasKey('database', $array, 'مقادیر کانفیگ به درستی ست نشده‌اند');
$this->assertArrayHasKey('migrations', $array, 'مقادیر کانفیگ به درستی ست نشده‌اند');
$this->assertArrayHasKey('routes', $array, 'مقادیر کانفیگ به درستی ست نشده‌اند');
$array = include dirname(__DIR__).'/../config/health.php';

$this->assertArrayHasKey('database', $array, 'Config values did not set true');
$this->assertArrayHasKey('migrations', $array, 'Config values did not set true');
$this->assertArrayHasKey('routes', $array, 'Config values did not set true');
}
}
File renamed without changes.

0 comments on commit 7a25745

Please sign in to comment.