<?php
namespace Foo\Bar;
use PHPUnit\Framework\TestCase;
class AbstractClassTest extends TestCase
{
public function testEventTrigger()
{
$class = $this->getMockForAbstractClass(
AbstractClass::class,
[],
"Magic",
false,
false,
true,
['onTest']
);
$class->method('onTest')
->will($this->returnValue(true));
$this->assertTrue($class->trigger("Test");
}
}