Skip to content

Commit

Permalink
Merge pull request #2 from byjg/bump
Browse files Browse the repository at this point in the history
Bump
  • Loading branch information
byjg authored May 21, 2023
2 parents 189a69f + 4d07a93 commit 3b042d7
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 40 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: PHPUnit
on:
push:
branches:
- master
tags:
- "*.*.*"
pull_request:
branches:
- master
schedule:
- cron: "0 8 * * 1"

jobs:
Build:
runs-on: 'ubuntu-latest'
container: 'byjg/php:${{ matrix.php-version }}-cli'
strategy:
matrix:
php-version:
- "8.1"
- "8.0"
- "7.4"
- "7.3"
- "7.2"
- "7.1"

steps:
- uses: actions/checkout@v3
- run: composer install
- run: ./vendor/bin/phpunit

Documentation:
runs-on: 'ubuntu-latest'
needs: Build
if: github.ref == 'refs/heads/master'
env:
DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}'
steps:
- uses: actions/checkout@v3
- run: curl https://opensource.byjg.com/add-doc.sh | bash /dev/stdin php anydataset-array
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ vendor
.idea

node_modules
.usdocker
.usdocker
.phpunit.result.cache
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# AnyDataset-Array

[![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)
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)
[![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/anydataset-array/)
[![GitHub license](https://img.shields.io/github/license/byjg/anydataset-array.svg)](https://opensource.byjg.com/opensource/licensing.html)
[![GitHub release](https://img.shields.io/github/release/byjg/anydataset-array.svg)](https://github.com/byjg/anydataset-array/releases/)
[![Build Status](https://travis-ci.com/byjg/anydataset-array.svg?branch=master)](https://travis-ci.com/byjg/anydataset-array)


Array abstraction dataset. Anydataset is an agnostic data source abstraction layer in PHP.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"minimum-stability": "dev",
"require": {
"php": ">=5.6.0",
"byjg/anydataset": "4.1.*"
"byjg/anydataset": "4.9.*"
},
"require-dev": {
"phpunit/phpunit": "5.7.*|7.4.*"
"phpunit/phpunit": "5.7.*|7.4.*|^9.5"
},
"license": "MIT"
}
10 changes: 9 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ and open the template in the editor.

<!-- see http://www.phpunit.de/wiki/Documentation -->
<phpunit bootstrap="./vendor/autoload.php"
colors="false"
colors="true"
testdox="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="true"
stopOnFailure="false">

<php>
<ini name="display_errors" value="On" />
<ini name="display_startup_errors" value="On" />
<ini name="error_reporting" value="E_ALL" />
</php>

<filter>
<whitelist>
<directory>./src</directory>
Expand Down
17 changes: 2 additions & 15 deletions tests/ArrayDatasetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use PHPUnit\Framework\TestCase;
use Tests\AnyDataset\Sample\ModelGetter;
use Tests\AnyDataset\Sample\ModelPublic;
use UnexpectedValueException;

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

// Run before each test case
public function setUp()
{

}

// Run end each test case
public function teardown()
{

}

/**
* @expectedException \UnexpectedValueException
*/
public function testInvalidConstructor()
{
$this->expectException(UnexpectedValueException::class);
new ArrayDataset('aaa');
}

Expand Down

0 comments on commit 3b042d7

Please sign in to comment.