Skip to content

Commit

Permalink
Merge pull request #140 from bumbummen99/back
Browse files Browse the repository at this point in the history
Update for Laravel 8
  • Loading branch information
mewebstudio authored Sep 10, 2020
2 parents 0144565 + bc45b25 commit da76c87
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 55 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ Vagrantfile
Homestead.yaml
after.sh
aliases

# Tests
.phpunit.result.cache
23 changes: 0 additions & 23 deletions .scrutinizer.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ cache:

before_script:
- travis_retry composer self-update
- travis_retry composer install --prefer-source --no-interaction --dev
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-source --no-interaction --dev

script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- vendor/bin/phpunit --coverage-clover=coverage.xml

after_script:
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
- bash <(curl -s https://codecov.io/bash)
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# HTMLPurifier for Laravel 5/6/7
# HTMLPurifier for Laravel 5/6/7/8

[![Build Status](https://scrutinizer-ci.com/g/mewebstudio/Purifier/badges/build.png?b=master)](https://scrutinizer-ci.com/g/mewebstudio/Purifier/build-status/master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mewebstudio/Purifier/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mewebstudio/Purifier/?branch=master)
[![Build Status](https://travis-ci.org/mewebstudio/Purifier.svg?branch=master)](https://travis-ci.org/github/mewebstudio/Purifier)
[![codecov](https://codecov.io/gh/mewebstudio/Purifier/branch/master/graph/badge.svg)](https://codecov.io/gh/mewebstudio/Purifier)
[![Latest Stable Version](https://poser.pugx.org/mews/Purifier/v/stable.svg)](https://packagist.org/packages/mews/Purifier)
[![Latest Unstable Version](https://poser.pugx.org/mews/Purifier/v/unstable.svg)](https://packagist.org/packages/mews/Purifier)
[![License](https://poser.pugx.org/mews/Purifier/license.svg)](https://packagist.org/packages/mews/Purifier)
Expand Down
33 changes: 16 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@
],
"require": {
"php": "^7.2",
"illuminate/config": "^5.1|^6.0|^7.0",
"illuminate/support": "^5.1|^6.0|^7.0",
"illuminate/filesystem": "^5.1|^6.0|^7.0",
"illuminate/config": "^5.8|^6.0|^7.0|^8.0",
"illuminate/support": "^5.8|^6.0|^7.0|^8.0",
"illuminate/filesystem": "^5.8|^6.0|^7.0|^8.0",
"ezyang/htmlpurifier": "4.13.*"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.0",
"mockery/mockery": "0.9.*",
"graham-campbell/testbench": "^3.2",
"scrutinizer/ocular": "^1.3"
"phpunit/phpunit": "^8.0|^9.0",
"mockery/mockery": "^1.0",
"graham-campbell/testbench": "^3.2|^5.5.1"
},
"suggest": {
"laravel/framework": "To test the Laravel bindings",
Expand All @@ -43,16 +42,16 @@
"Mews\\Tests\\Purifier\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"Mews\\Purifier\\PurifierServiceProvider"
],
"aliases": {
"Purifier": "Mews\\Purifier\\Facades\\Purifier"
}
}
},
"extra": {
"laravel": {
"providers": [
"Mews\\Purifier\\PurifierServiceProvider"
],
"aliases": {
"Purifier": "Mews\\Purifier\\Facades\\Purifier"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
15 changes: 5 additions & 10 deletions tests/PurifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class PurifierTest extends AbstractTestCase
{
public function setUp()
public function setUp() : void
{
parent::setUp();

Expand All @@ -24,19 +24,14 @@ public function testConstruct()
{
$purifier = $this->app->make('purifier');
$this->assertInstanceOf(Purifier::class, $purifier);
$this->assertAttributeInstanceOf(HTMLPurifier::class, 'purifier', $purifier);
$this->assertInstanceOf(HTMLPurifier::class, $purifier->getInstance());
}

/**
* @expectedException \Exception
* @expectedExceptionMessage Configuration parameters not loaded!
*/
/**
* @expectedException \Exception
* @expectedExceptionMessage Configuration parameters not loaded!
*/
public function testExpectionIsThrownWhenConfigIsBad()
{
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Configuration parameters not loaded!');

new Purifier(new Filesystem(), new Repository());
}

Expand Down

0 comments on commit da76c87

Please sign in to comment.