Skip to content

Commit

Permalink
updated to PHPUnit 9
Browse files Browse the repository at this point in the history
  • Loading branch information
poef committed Feb 23, 2020
1 parent 62081ce commit 31db1cb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,26 @@ ARC: Ariadne Component Library
[![Latest Unstable Version](https://poser.pugx.org/arc/events/v/unstable.svg)](https://packagist.org/packages/arc/events)
[![License](https://poser.pugx.org/arc/events/license.svg)](https://packagist.org/packages/arc/events)

A flexible component library for PHP 5.4+
-----------------------------------------
A flexible component library for PHP
------------------------------------

The Ariadne Component Library is a spinoff from the Ariadne Web
Application Framework and Content Management System
[ http://www.ariadne-cms.org/ ]

arc/events contains
------------------
- events: W3C style event system, with a filesystem tree as the DOM
- [events](docs/events.md): W3C style event system, with a filesystem tree as the DOM

Example code:

```php
\arc\events::cd('/foo/')->listen( 'onbeforesave', function( $event ) {
return $event->preventDefault(); // don't allow saves in /foo/
});

$eventData = \arc\events::cd('/foo/bar/')->fire( 'onbeforesave' );
if ( $eventData ) {
// save something, but alas - it has been prevented by a listener
}
```
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@
}
],
"require": {
"php": ">=5.4",
"arc/base": "~2.1"
"php": ">=7.1",
"arc/base": "~3.0"
},
"autoload": {
"psr-4": {
"arc\\": "src/"
}
},
"require-dev": {
"phpunit/phpunit": "5.1.*"
"phpunit/phpunit": "9.*"
},
"scripts": {
"test": "phpunit --testdox"
}
}
2 changes: 1 addition & 1 deletion tests/events.Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/


class TestEvents extends PHPUnit_Framework_TestCase
class TestEvents extends PHPUnit\Framework\TestCase
{
function testFireListenRemove()
{
Expand Down

0 comments on commit 31db1cb

Please sign in to comment.