for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Article\Test\View\Helper;
class EventHelperTest extends \PHPUnit_Framework_TestCase
{
public function testInvokingAdminUserHelperShouldReturnItSelf()
$eventService = $this->getMockBuilder('Article\Service\EventService')
->disableOriginalConstructor()
->getMockForAbstractClass();
$eventHelper = new \Article\View\Helper\EventHelper($eventService);
static::assertInstanceOf(\Article\View\Helper\EventHelper::class, $eventHelper());
}
public function testAllShouldReturnArray()
->setMethods(['fetchLatest'])
$eventService->expects(static::once())
->method('fetchLatest')
->willReturn([]);
static::assertSame([], $eventHelper->getLatest());