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 VideoHelperTest extends \PHPUnit_Framework_TestCase
{
public function testInvokingAdminUserHelperShouldReturnItSelf()
$videoService = $this->getMockBuilder('Article\Service\VideoService')
->disableOriginalConstructor()
->getMockForAbstractClass();
$videoHelper = new \Article\View\Helper\VideoHelper($videoService);
static::assertInstanceOf(\Article\View\Helper\VideoHelper::class, $videoHelper());
}
public function testGetLatestShouldReturnArray()
->setMethods(['fetchLatest'])
$videoService->expects(static::once())
->method('fetchLatest')
->willReturn([]);
static::assertSame([], $videoHelper->getLatest());