-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redo tests without using full zf2 as require-dev
- Loading branch information
Showing
7 changed files
with
70 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* @license http://opensource.org/licenses/MIT MIT | ||
* @copyright Copyright (c) 2015 Vinicius Fagundes | ||
*/ | ||
|
||
namespace ZffTest\Html2Pdf\Mvc\Service; | ||
|
||
use PHPUnit_Framework_TestCase as TestCase; | ||
use Zff\Html2Pdf\Mvc\Service\ViewHtml2PdfStrategyFactory; | ||
use Zend\ServiceManager\ServiceManager; | ||
use Zend\Mvc\Service\ServiceManagerConfig; | ||
use Zend\Mvc\Application; | ||
|
||
class ViewHtml2PdfStrategyFactoryTest extends TestCase | ||
{ | ||
/** | ||
* @var ServiceManager | ||
*/ | ||
protected $serviceManager; | ||
|
||
public function setUp() | ||
{ | ||
$config = ['modules' => ['Zff\\Html2Pdf'], 'module_listener_options' => []]; | ||
|
||
$serviceManager = new ServiceManager(new ServiceManagerConfig()); | ||
$serviceManager->setService('ApplicationConfig', $config); | ||
$serviceManager->get('ModuleManager')->loadModules(); | ||
|
||
$application = new Application($config, $serviceManager); | ||
$application->bootstrap(); | ||
|
||
$this->serviceManager = $serviceManager; | ||
} | ||
|
||
public function testCanCreateHtml2PdfStrategyFromNewFactoryInstance() | ||
{ | ||
$factory = new ViewHtml2PdfStrategyFactory; | ||
$this->assertInstanceOf('\Zff\Html2Pdf\View\Strategy\Html2PdfStrategy', $factory->createService($this->serviceManager)); | ||
} | ||
|
||
public function testCanCreateHtml2PdfStrategyFromServiceManager() | ||
{ | ||
$this->assertInstanceOf('\Zff\Html2Pdf\View\Strategy\Html2PdfStrategy', $this->serviceManager->get('ViewHtml2PdfStrategy')); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.