Laravel 5.6 updates

Travis config update

Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
Manish Verma
2018-08-06 20:08:55 +05:30
parent 126fbb0255
commit 1ac0f42a58
2464 changed files with 65239 additions and 46734 deletions

View File

@@ -153,6 +153,31 @@ class TraceableEventDispatcherTest extends TestCase
$this->assertCount(2, $dispatcher->getCalledListeners());
}
public function testItReturnsNoOrphanedEventsWhenCreated()
{
$tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
$events = $tdispatcher->getOrphanedEvents();
$this->assertEmpty($events);
}
public function testItReturnsOrphanedEventsAfterDispatch()
{
$tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
$tdispatcher->dispatch('foo');
$events = $tdispatcher->getOrphanedEvents();
$this->assertCount(1, $events);
$this->assertEquals(array('foo'), $events);
}
public function testItDoesNotReturnHandledEvents()
{
$tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
$tdispatcher->addListener('foo', function () {});
$tdispatcher->dispatch('foo');
$events = $tdispatcher->getOrphanedEvents();
$this->assertEmpty($events);
}
public function testLogger()
{
$logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
@@ -246,6 +271,17 @@ class TraceableEventDispatcherTest extends TestCase
$this->assertCount(1, $eventDispatcher->getListeners('foo'), 'expected listener1 to be removed');
}
public function testClearOrphanedEvents()
{
$tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
$tdispatcher->dispatch('foo');
$events = $tdispatcher->getOrphanedEvents();
$this->assertCount(1, $events);
$tdispatcher->reset();
$events = $tdispatcher->getOrphanedEvents();
$this->assertCount(0, $events);
}
}
class EventSubscriber implements EventSubscriberInterface