Skip to content

Commit 5de4ee5

Browse files
committed
Add github workflow
1 parent 8346107 commit 5de4ee5

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.github/workflows/phpunit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
- "7.3"
2525
- "7.2"
2626
- "7.1"
27-
- "7.0"
28-
- "5.6"
27+
# - "7.0"
28+
# - "5.6"
2929

3030
steps:
3131
- uses: actions/checkout@v2

tests/SingletonTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use ByJG\DesignPattern\SingletonException;
4+
35
require_once __DIR__ . "/../vendor/autoload.php";
46
require_once "Sample1.php";
57
require_once "Sample2.php";
@@ -36,20 +38,16 @@ public function testSingleton()
3638
$this->assertEquals(40, $sample1->property);
3739
}
3840

39-
/**
40-
* @expectedException \ByJG\DesignPattern\SingletonException
41-
*/
4241
public function testClone()
4342
{
43+
$this->expectException(SingletonException::class);
4444
$sample1 = Sample1::getInstance();
4545
$sample2 = clone $sample1;
4646
}
4747

48-
/**
49-
* @expectedException \ByJG\DesignPattern\SingletonException
50-
*/
5148
public function testSerialize()
5249
{
50+
$this->expectException(SingletonException::class);
5351
$sample1 = Sample1::getInstance();
5452
$serialize = serialize($sample1);
5553
}

0 commit comments

Comments
 (0)