This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
1 deletion.
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,37 @@ | |||
<?php | |||
|
|||
namespace Test; | |||
|
|||
use Nette, | |||
Tester, | |||
Tester\Assert; | |||
|
|||
$container = require __DIR__ . '/bootstrap.php'; | |||
|
|||
|
|||
|
|||
class ExampleTest extends Tester\TestCase | |||
{ | |||
private $container; | |||
|
|||
|
|||
function __construct(Nette\DI\Container $container) | |||
{ | |||
$this->container = $container; | |||
} | |||
|
|||
|
|||
function setUp() | |||
{ | |||
} | |||
|
|||
|
|||
function testSomething() | |||
{ | |||
Assert::true( true ); | |||
} | |||
|
|||
} | |||
|
|||
|
|||
id(new ExampleTest($container))->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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
<?php | |||
|
|||
require __DIR__ . '/../libs/autoload.php'; | |||
|
|||
if (!include __DIR__ . '/../libs/Nette/tester/Tester/bootstrap.php') { | |||
die('Install Nette Tester using `composer update --dev`'); | |||
} | |||
|
|||
function id($val) { | |||
return $val; | |||
} | |||
|
|||
$configurator = new Nette\Config\Configurator; | |||
$configurator->setDebugMode(FALSE); | |||
$configurator->setTempDirectory(__DIR__ . '/../temp'); | |||
$configurator->createRobotLoader() | |||
->addDirectory(__DIR__ . '/../app') | |||
->register(); | |||
|
|||
$configurator->addConfig(__DIR__ . '/../app/config/config.neon'); | |||
$configurator->addConfig(__DIR__ . '/../app/config/config.local.neon'); | |||
return $configurator->createContainer(); |