Created
June 21, 2017 13:47
-
-
Save Fuco1/71c009e79922255ec2843e72c24c8c2e to your computer and use it in GitHub Desktop.
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
$configurator->createRobotLoader() | |
->addDirectory($appDir) | |
->addDirectory(__DIR__ . '/Utils') | |
->register(); | |
// zmenit na => (pridat .phpt scan) | |
$robotLoader = $configurator->createRobotLoader(); | |
$robotLoader->acceptFiles = '*.php, *.phpt'; | |
$robotLoader->addDirectory($appDir) | |
->addDirectory(__DIR__) | |
->register(); |
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
<?php | |
namespace Tests\Entity; | |
class CampaignTest extends Tester\TestCase | |
{ | |
private $entityManager; | |
public function __construct(Kdyby\Doctrine\EntityManager $entityManager) | |
{ | |
$this->entityManager = $entityManager; | |
} | |
public function testModifyLastActivatedAt() { ... } | |
} | |
if (getenv(Tester\Environment::RUNNER)) { | |
$container = require_once __DIR__ . '/../container.php'; | |
(new CampaignTest($container->getByType(Kdyby\Doctrine\EntityManager::class)))->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
<?php | |
namespace Tests\Entity; | |
$container = require_once __DIR__ . '/../container.php'; | |
class CampaignTest extends Tester\TestCase | |
{ | |
private $entityManager; | |
public function __construct(Kdyby\Doctrine\EntityManager $entityManager) | |
{ | |
$this->entityManager = $entityManager; | |
} | |
public function testModifyLastActivatedAt() { ... } | |
} | |
(new CampaignTest($container->getByType(Kdyby\Doctrine\EntityManager::class)))->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
parameters: | |
bootstrap: %rootDir%/../../../tests/php/container.php # < cesta k boostrap fajlu ktery se pouziva v testech pro ziskani containeru |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment