Skip to content

Commit bb7bca0

Browse files
authored
Merge pull request #42 from laravel-notification-channels/scrutinizer-coverage
Scrutinizer coverage
2 parents 60bdc68 + 86dc4ac commit bb7bca0

File tree

6 files changed

+39
-18
lines changed

6 files changed

+39
-18
lines changed

.github/workflows/coverage.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

tests/PushbulletMessageTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use PHPUnit\Framework\MockObject\MockObject;
88
use PHPUnit\Framework\TestCase;
99

10+
/**
11+
* @covers \NotificationChannels\Pushbullet\PushbulletMessage
12+
*/
1013
class PushbulletMessageTest extends TestCase
1114
{
1215
/** @test */

tests/Targets/ChannelTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88
use PHPUnit\Framework\TestCase;
99

1010
/**
11-
* @coversDefaultClass \NotificationChannels\Pushbullet\Targets\Channel
11+
* @covers \NotificationChannels\Pushbullet\Targets\Channel
1212
*/
1313
class ChannelTest extends TestCase
1414
{
1515
/**
1616
* @test
17-
*
18-
* @covers ::__construct
19-
* @covers ::getTarget
2017
*/
2118
public function it_is_properly_represented_as_array()
2219
{

tests/Targets/DeviceTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88
use PHPUnit\Framework\TestCase;
99

1010
/**
11-
* @coversDefaultClass \NotificationChannels\Pushbullet\Targets\Device
11+
* @covers \NotificationChannels\Pushbullet\Targets\Device
1212
*/
1313
class DeviceTest extends TestCase
1414
{
1515
/**
1616
* @test
17-
*
18-
* @covers ::__construct
19-
* @covers ::getTarget
2017
*/
2118
public function it_is_properly_represented_as_array()
2219
{

tests/Targets/EmailTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99
use PHPUnit\Framework\TestCase;
1010

1111
/**
12-
* @coversDefaultClass \NotificationChannels\Pushbullet\Targets\Email
12+
* @covers \NotificationChannels\Pushbullet\Targets\Email
1313
*/
1414
class EmailTest extends TestCase
1515
{
1616
/**
1717
* @test
18-
*
19-
* @covers ::__construct
20-
* @covers ::getTarget
2118
*/
2219
public function it_is_properly_represented_as_array()
2320
{
@@ -28,8 +25,6 @@ public function it_is_properly_represented_as_array()
2825

2926
/**
3027
* @test
31-
*
32-
* @covers ::__construct
3328
*/
3429
public function invalid_email_is_not_accepted()
3530
{

tests/Targets/UserDevicesTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88
use PHPUnit\Framework\TestCase;
99

1010
/**
11-
* @coversDefaultClass \NotificationChannels\Pushbullet\Targets\UserDevices
11+
* @covers \NotificationChannels\Pushbullet\Targets\UserDevices
1212
*/
1313
class UserDevicesTest extends TestCase
1414
{
1515
/**
1616
* @test
17-
*
18-
* @covers ::__construct
19-
* @covers ::getTarget
2017
*/
2118
public function it_is_properly_represented_as_array()
2219
{

0 commit comments

Comments
 (0)