Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 5612040

Browse files
committed
test code update
1 parent be75f34 commit 5612040

File tree

4 files changed

+26
-18
lines changed

4 files changed

+26
-18
lines changed

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,10 @@
1111
"smsapi",
1212
"smsapimany",
1313
"SYED"
14-
]
14+
],
15+
"intelephense.environment.includePaths": [
16+
"./vendor/pestphp",
17+
"./vendor/phpunit/phpunit",
18+
"./vendor/laravel"
19+
],
1520
}

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
"laravel/pint": "^1.0",
4343
"nunomaduro/collision": "^6.0",
4444
"orchestra/testbench": "^7.0",
45-
"pestphp/pest": "^1.21",
46-
"pestphp/pest-plugin-laravel": "^1.1",
45+
"pestphp/pest": "^1.23",
46+
"pestphp/pest-plugin-laravel": "^1.4",
4747
"phpstan/phpstan": "^1.12",
4848
"phpstan/phpstan-deprecation-rules": "^1.0",
4949
"phpstan/phpstan-phpunit": "^1.0",
50-
"phpunit/phpunit": "^9.5",
50+
"phpunit/phpunit": "^9.6",
5151
"spatie/laravel-ray": "^1.26"
5252
},
5353
"autoload": {
@@ -85,4 +85,4 @@
8585
},
8686
"minimum-stability": "dev",
8787
"prefer-stable": true
88-
}
88+
}

phpstan.neon.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ includes:
44
parameters:
55
level: 4
66
paths:
7-
- config
8-
- src
97
- tests
108
tmpDir: build/phpstan
119
# checkOctaneCompatibility: true

tests/ExampleTest.php

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,53 @@
22

33
// Test Set BulkSmsBd Config Mode log
44
test('set BulkSmsBd Config Mode log', function () {
5-
config(['bulksmsbd.mode' => 'log']);
6-
$this->assertEquals('log', config('bulksmsbd.mode'));
5+
expect(config('bulksmsbd.mode'))->toEqual('log');
76
});
87

98
// Check BulkSmsBd Instance Test
109
test('check BulkSmsBd instance', function () {
11-
$this->assertInstanceOf(\Nanopkg\BulkSmsBd\BulkSmsBd::class, \Nanopkg\BulkSmsBd\Facades\BulkSmsBd::getFacadeRoot());
10+
expect(\Nanopkg\BulkSmsBd\Facades\BulkSmsBd::getFacadeRoot())->toBeInstanceOf(\Nanopkg\BulkSmsBd\BulkSmsBd::class);
1211
});
1312

1413
// Check BulkSmsBd OneToOne Test
1514
test('check BulkSmsBd OneToOne', function () {
16-
$this->assertInstanceOf(\Nanopkg\BulkSmsBd\BulkSmsBd::class, \Nanopkg\BulkSmsBd\Facades\BulkSmsBd::OneToOne('8801700000000', 'message'));
15+
expect(\Nanopkg\BulkSmsBd\Facades\BulkSmsBd::OneToOne('8801700000000', 'message'))
16+
->toBeInstanceOf(\Nanopkg\BulkSmsBd\BulkSmsBd::class);
1717
});
1818

1919
// Check BulkSmsBd OneToMany Test
2020
test('check BulkSmsBd OneToMany', function () {
21-
$this->assertInstanceOf(\Nanopkg\BulkSmsBd\BulkSmsBd::class, \Nanopkg\BulkSmsBd\Facades\BulkSmsBd::OneToMany(['8801700000000', '8801800000000'], 'message'));
21+
expect(\Nanopkg\BulkSmsBd\Facades\BulkSmsBd::OneToMany(['8801700000000', '8801800000000'], 'message'))
22+
->toBeInstanceOf(\Nanopkg\BulkSmsBd\BulkSmsBd::class);
2223
});
2324

2425
// Check BulkSmsBd ManyToMany Test
2526
test('check BulkSmsBd ManyToMany', function () {
26-
$this->assertInstanceOf(\Nanopkg\BulkSmsBd\BulkSmsBd::class, \Nanopkg\BulkSmsBd\Facades\BulkSmsBd::ManyToMany([
27+
expect(\Nanopkg\BulkSmsBd\Facades\BulkSmsBd::ManyToMany([
2728
['to' => '8801700000000', 'message' => 'message'],
28-
]));
29+
]))->toBeInstanceOf(\Nanopkg\BulkSmsBd\BulkSmsBd::class);
2930
});
3031

3132
// Check BulkSmsBd Send Test
3233
test('check BulkSmsBd Send', function () {
33-
$this->assertTrue(\Nanopkg\BulkSmsBd\Facades\BulkSmsBd::send());
34+
expect(\Nanopkg\BulkSmsBd\Facades\BulkSmsBd::send())
35+
->toBeTrue();
3436
});
3537

3638
// Check BulkSmsBd OneToOne Job Test
3739
test('check BulkSmsBd OneToOne Job', function () {
38-
$this->assertInstanceOf(\Nanopkg\BulkSmsBd\Jobs\BulkSmsBdOneToOne::class, new \Nanopkg\BulkSmsBd\Jobs\BulkSmsBdOneToOne('8801700000000', 'message'));
40+
expect(new \Nanopkg\BulkSmsBd\Jobs\BulkSmsBdOneToOne('8801700000000', 'message'))
41+
->toBeInstanceOf(\Nanopkg\BulkSmsBd\Jobs\BulkSmsBdOneToOne::class);
3942
});
4043

4144
// Check BulkSmsBd OneToMany Job Test
4245
test('check BulkSmsBd OneToMany Job', function () {
43-
$this->assertInstanceOf(\Nanopkg\BulkSmsBd\Jobs\BulkSmsBdOneToMany::class, new \Nanopkg\BulkSmsBd\Jobs\BulkSmsBdOneToMany(['8801700000000', '8801800000000'], 'message'));
46+
expect(new \Nanopkg\BulkSmsBd\Jobs\BulkSmsBdOneToMany(['8801700000000', '8801800000000'], 'message'))
47+
->toBeInstanceOf(\Nanopkg\BulkSmsBd\Jobs\BulkSmsBdOneToMany::class);
4448
});
4549

4650
// Check BulkSmsBd Channel Test
4751
test('check BulkSmsBd Channel', function () {
48-
$this->assertInstanceOf(\Nanopkg\BulkSmsBd\Broadcasting\BulkSmsBdChannel::class, new \Nanopkg\BulkSmsBd\Broadcasting\BulkSmsBdChannel);
52+
expect(new \Nanopkg\BulkSmsBd\Broadcasting\BulkSmsBdChannel)
53+
->toBeInstanceOf(\Nanopkg\BulkSmsBd\Broadcasting\BulkSmsBdChannel::class);
4954
});

0 commit comments

Comments
 (0)