File tree Expand file tree Collapse file tree 6 files changed +39
-18
lines changed Expand file tree Collapse file tree 6 files changed +39
-18
lines changed Original file line number Diff line number Diff line change
1
+ name : Unit test coverage
2
+
3
+ on :
4
+ - push
5
+ - pull_request
6
+
7
+ jobs :
8
+ tests :
9
+ runs-on : ubuntu-latest
10
+ name : Unit test coverage
11
+
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v2
15
+
16
+ - name : Setup PHP
17
+ uses : shivammathur/setup-php@v2
18
+ with :
19
+ php-version : 7.4
20
+ tools : composer:v2
21
+ coverage : pcov
22
+
23
+ - name : Install dependencies
24
+ run : composer update --prefer-stable --prefer-dist --no-interaction --no-progress
25
+
26
+ - name : Execute tests
27
+ run : vendor/bin/phpunit --verbose
28
+
29
+ - name : Send coverage to Scrutinizer
30
+ run : |
31
+ wget https://scrutinizer-ci.com/ocular.phar
32
+ php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
Original file line number Diff line number Diff line change 7
7
use PHPUnit \Framework \MockObject \MockObject ;
8
8
use PHPUnit \Framework \TestCase ;
9
9
10
+ /**
11
+ * @covers \NotificationChannels\Pushbullet\PushbulletMessage
12
+ */
10
13
class PushbulletMessageTest extends TestCase
11
14
{
12
15
/** @test */
Original file line number Diff line number Diff line change 8
8
use PHPUnit \Framework \TestCase ;
9
9
10
10
/**
11
- * @coversDefaultClass \NotificationChannels\Pushbullet\Targets\Channel
11
+ * @covers \NotificationChannels\Pushbullet\Targets\Channel
12
12
*/
13
13
class ChannelTest extends TestCase
14
14
{
15
15
/**
16
16
* @test
17
- *
18
- * @covers ::__construct
19
- * @covers ::getTarget
20
17
*/
21
18
public function it_is_properly_represented_as_array ()
22
19
{
Original file line number Diff line number Diff line change 8
8
use PHPUnit \Framework \TestCase ;
9
9
10
10
/**
11
- * @coversDefaultClass \NotificationChannels\Pushbullet\Targets\Device
11
+ * @covers \NotificationChannels\Pushbullet\Targets\Device
12
12
*/
13
13
class DeviceTest extends TestCase
14
14
{
15
15
/**
16
16
* @test
17
- *
18
- * @covers ::__construct
19
- * @covers ::getTarget
20
17
*/
21
18
public function it_is_properly_represented_as_array ()
22
19
{
Original file line number Diff line number Diff line change 9
9
use PHPUnit \Framework \TestCase ;
10
10
11
11
/**
12
- * @coversDefaultClass \NotificationChannels\Pushbullet\Targets\Email
12
+ * @covers \NotificationChannels\Pushbullet\Targets\Email
13
13
*/
14
14
class EmailTest extends TestCase
15
15
{
16
16
/**
17
17
* @test
18
- *
19
- * @covers ::__construct
20
- * @covers ::getTarget
21
18
*/
22
19
public function it_is_properly_represented_as_array ()
23
20
{
@@ -28,8 +25,6 @@ public function it_is_properly_represented_as_array()
28
25
29
26
/**
30
27
* @test
31
- *
32
- * @covers ::__construct
33
28
*/
34
29
public function invalid_email_is_not_accepted ()
35
30
{
Original file line number Diff line number Diff line change 8
8
use PHPUnit \Framework \TestCase ;
9
9
10
10
/**
11
- * @coversDefaultClass \NotificationChannels\Pushbullet\Targets\UserDevices
11
+ * @covers \NotificationChannels\Pushbullet\Targets\UserDevices
12
12
*/
13
13
class UserDevicesTest extends TestCase
14
14
{
15
15
/**
16
16
* @test
17
- *
18
- * @covers ::__construct
19
- * @covers ::getTarget
20
17
*/
21
18
public function it_is_properly_represented_as_array ()
22
19
{
You can’t perform that action at this time.
0 commit comments