for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace DmCommonTest\Factory\Service;
use DmCommon\Factory\Service\ErrorHandler;
use DmTest\ServiceManager\ServiceLocatorDummy;
class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
{
/** @var ErrorHandler */
private $sut;
public function setUp()
$this->sut = new ErrorHandler();
}
/**
* @covers DmCommon\Factory\Service\ErrorHandler
*/
public function testCreateService()
$serviceLocator = new ServiceLocatorDummy($this);
$serviceLocator->set('DmCommon\Exception\Log', $serviceLocator->get('Zend\Log\Logger'));
$result = $this->sut->createService($serviceLocator);
$this->assertInstanceOf('DmCommon\Service\ErrorHandler', $result);