Skip to content

Commit 7a25745

Browse files
Modify tests
Add unit file in directory, Fix feature test.
1 parent aa57a81 commit 7a25745

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

composer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
{
88
"name": "Mohammadreza",
99
"email": "[email protected]",
10-
"homepage": "https://m-rahimi.ir",
10+
"homepage": "https://github.com/Mohammadreza-73/Lara-Health",
1111
"role": "Developer"
1212
}
1313
],
14+
"license": "MIT",
15+
"require": {},
1416
"require-dev": {
1517
"orchestra/testbench": "^7.17"
1618
},
17-
"license": "MIT",
18-
"require": {},
1919
"autoload": {
2020
"psr-4": {
2121
"LaravelHealth\\": "src/"
@@ -24,6 +24,9 @@
2424
"autoload-dev": {
2525
"LaravelHealth\\Tests\\": "tests/"
2626
},
27+
"scripts": {
28+
"test": "vendor/bin/phpunit"
29+
},
2730
"extra": {
2831
"laravel": {
2932
"providers": [

tests/Feature/PackageSampleTest.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ class PackageSampleTest extends TestCase
88
{
99
public function testConfigFile()
1010
{
11-
$this->assertFileExists(__DIR__.'/../config/health.php', 'فایل کانفیگ وجود ندارد');
11+
$this->assertFileExists(dirname(__DIR__).'/../config/health.php', 'File not exists');
1212

13-
$array = include __DIR__.'/../config/health.php';
14-
$this->assertArrayHasKey('database', $array, 'مقادیر کانفیگ به درستی ست نشده‌اند');
15-
$this->assertArrayHasKey('migrations', $array, 'مقادیر کانفیگ به درستی ست نشده‌اند');
16-
$this->assertArrayHasKey('routes', $array, 'مقادیر کانفیگ به درستی ست نشده‌اند');
13+
$array = include dirname(__DIR__).'/../config/health.php';
14+
15+
$this->assertArrayHasKey('database', $array, 'Config values did not set true');
16+
$this->assertArrayHasKey('migrations', $array, 'Config values did not set true');
17+
$this->assertArrayHasKey('routes', $array, 'Config values did not set true');
1718
}
1819
}

tests/Unit.php tests/Unit/Unit.php

File renamed without changes.

0 commit comments

Comments
 (0)