forked from Kdyby/Events
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update with released stable Nette version
- Loading branch information
1 parent
7743191
commit 0c09f5a
Showing
5 changed files
with
100 additions
and
30 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 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,50 @@ | ||
<?php | ||
|
||
/** | ||
* Test: Kdyby\Events\Event. | ||
* | ||
* @testCase | ||
*/ | ||
|
||
namespace KdybyTests\Events; | ||
|
||
use Kdyby\Events\DI\EventsExtension; | ||
use Kdyby\Events\Diagnostics\Panel; | ||
use Nette\Configurator; | ||
use Tester\Assert; | ||
|
||
require_once __DIR__ . '/../bootstrap.php'; | ||
|
||
class PanelTest extends \Tester\TestCase | ||
{ | ||
|
||
/** | ||
* @param string $configFile | ||
* @return \Nette\DI\Container | ||
*/ | ||
public function createContainer($configFile) | ||
{ | ||
$config = new Configurator(); | ||
$config->setTempDirectory(TEMP_DIR); | ||
$config->addParameters(['container' => ['class' => 'SystemContainer_' . md5($configFile)]]); | ||
EventsExtension::register($config); | ||
$config->addConfig(__DIR__ . '/../nette-reset.neon'); | ||
$config->addConfig(__DIR__ . '/config/' . $configFile . '.neon'); | ||
return $config->createContainer(); | ||
} | ||
|
||
public function testRender() | ||
{ | ||
$container = $this->createContainer('panel'); | ||
|
||
$panel = new Panel($container); | ||
|
||
Assert::noError(function () use ($panel) { | ||
$panel->getTab(); | ||
$panel->getPanel(); | ||
}); | ||
} | ||
|
||
} | ||
|
||
(new PanelTest())->run(); |
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,3 @@ | ||
events: | ||
|
||
services: |