File: PsrEventDispatcherStoppableEventInterface.phpt

package info (click to toggle)
php-psr 1.2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 548 kB
  • sloc: ansic: 1,485; pascal: 203; xml: 150; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 697 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Psr\EventDispatcher\StoppableEventInterface
--SKIPIF--
<?php include('skip_lt_php72.inc'); ?>
--FILE--
<?php
include __DIR__ . '/SampleStoppableEvent.inc';
var_dump(interface_exists('\\Psr\\EventDispatcher\\StoppableEventInterface', false));
var_dump(class_implements('SampleStoppableEvent', false));
$event = new SampleStoppableEvent();
var_dump($event instanceof SampleStoppableEvent);
$return = $event->isPropagationStopped();
var_dump(is_bool($return));
--EXPECT--
bool(true)
array(1) {
  ["PsrExt\EventDispatcher\StoppableEventInterface"]=>
  string(46) "PsrExt\EventDispatcher\StoppableEventInterface"
}
bool(true)
string(42) "SampleStoppableEvent::isPropagationStopped"
bool(true)