Skip to content

Commit 3b042d7

Browse files
authored
Merge pull request #2 from byjg/bump
Bump
2 parents 189a69f + 4d07a93 commit 3b042d7

File tree

7 files changed

+57
-40
lines changed

7 files changed

+57
-40
lines changed

.github/workflows/phpunit.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: PHPUnit
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags:
7+
- "*.*.*"
8+
pull_request:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: "0 8 * * 1"
13+
14+
jobs:
15+
Build:
16+
runs-on: 'ubuntu-latest'
17+
container: 'byjg/php:${{ matrix.php-version }}-cli'
18+
strategy:
19+
matrix:
20+
php-version:
21+
- "8.1"
22+
- "8.0"
23+
- "7.4"
24+
- "7.3"
25+
- "7.2"
26+
- "7.1"
27+
28+
steps:
29+
- uses: actions/checkout@v3
30+
- run: composer install
31+
- run: ./vendor/bin/phpunit
32+
33+
Documentation:
34+
runs-on: 'ubuntu-latest'
35+
needs: Build
36+
if: github.ref == 'refs/heads/master'
37+
env:
38+
DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}'
39+
steps:
40+
- uses: actions/checkout@v3
41+
- run: curl https://opensource.byjg.com/add-doc.sh | bash /dev/stdin php anydataset-array

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ vendor
66
.idea
77

88
node_modules
9-
.usdocker
9+
.usdocker
10+
.phpunit.result.cache

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# AnyDataset-Array
22

3+
[![Build Status](https://github.com/byjg/anydataset-array/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/anydataset-array/actions/workflows/phpunit.yml)
34
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)
45
[![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/anydataset-array/)
56
[![GitHub license](https://img.shields.io/github/license/byjg/anydataset-array.svg)](https://opensource.byjg.com/opensource/licensing.html)
67
[![GitHub release](https://img.shields.io/github/release/byjg/anydataset-array.svg)](https://github.com/byjg/anydataset-array/releases/)
7-
[![Build Status](https://travis-ci.com/byjg/anydataset-array.svg?branch=master)](https://travis-ci.com/byjg/anydataset-array)
88

99

1010
Array abstraction dataset. Anydataset is an agnostic data source abstraction layer in PHP.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"minimum-stability": "dev",
1111
"require": {
1212
"php": ">=5.6.0",
13-
"byjg/anydataset": "4.1.*"
13+
"byjg/anydataset": "4.9.*"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "5.7.*|7.4.*"
16+
"phpunit/phpunit": "5.7.*|7.4.*|^9.5"
1717
},
1818
"license": "MIT"
1919
}

phpunit.xml.dist

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ and open the template in the editor.
77

88
<!-- see http://www.phpunit.de/wiki/Documentation -->
99
<phpunit bootstrap="./vendor/autoload.php"
10-
colors="false"
10+
colors="true"
11+
testdox="true"
1112
convertErrorsToExceptions="true"
1213
convertNoticesToExceptions="true"
1314
convertWarningsToExceptions="true"
15+
convertDeprecationsToExceptions="true"
1416
stopOnFailure="false">
1517

18+
<php>
19+
<ini name="display_errors" value="On" />
20+
<ini name="display_startup_errors" value="On" />
21+
<ini name="error_reporting" value="E_ALL" />
22+
</php>
23+
1624
<filter>
1725
<whitelist>
1826
<directory>./src</directory>

tests/ArrayDatasetTest.php

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use PHPUnit\Framework\TestCase;
1010
use Tests\AnyDataset\Sample\ModelGetter;
1111
use Tests\AnyDataset\Sample\ModelPublic;
12+
use UnexpectedValueException;
1213

1314
require_once "Sample/ModelGetter.php";
1415
require_once "Sample/ModelPublic.php";
@@ -23,23 +24,9 @@ class ArrayDatasetTest extends TestCase
2324
"B" => array('code' => 1001, 'name' => "ProdB"),
2425
"C" => array('code' => 1002, 'name' => "ProdC"));
2526

26-
// Run before each test case
27-
public function setUp()
28-
{
29-
30-
}
31-
32-
// Run end each test case
33-
public function teardown()
34-
{
35-
36-
}
37-
38-
/**
39-
* @expectedException \UnexpectedValueException
40-
*/
4127
public function testInvalidConstructor()
4228
{
29+
$this->expectException(UnexpectedValueException::class);
4330
new ArrayDataset('aaa');
4431
}
4532

0 commit comments

Comments
 (0)