-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from broadway/functional-test
functional test
- Loading branch information
Showing
8 changed files
with
151 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/vendor/ | ||
composer.lock | ||
test/Functional/cache | ||
test/Functional/logs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the broadway/broadway package. | ||
* | ||
* (c) Qandidate.com <opensource@qandidate.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Broadway\Bundle\BroadwayBundle\BroadwayBundle; | ||
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; | ||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; | ||
use Symfony\Component\Config\Loader\LoaderInterface; | ||
use Symfony\Component\HttpKernel\Kernel; | ||
|
||
class AppKernel extends Kernel | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function registerBundles() | ||
{ | ||
return [ | ||
new FrameworkBundle(), | ||
new DoctrineBundle(), | ||
new BroadwayBundle(), | ||
]; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function registerContainerConfiguration(LoaderInterface $loader) | ||
{ | ||
$loader->load(__DIR__ . '/config_functional.yml'); | ||
} | ||
} |
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,72 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the broadway/broadway package. | ||
* | ||
* (c) Qandidate.com <opensource@qandidate.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Broadway\Bundle\BroadwayBundle\Functional; | ||
|
||
use Broadway\Auditing\NullByteCommandSerializer; | ||
use Broadway\EventDispatcher\EventDispatcher; | ||
use Broadway\EventStore\Dbal\DBALEventStore; | ||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||
|
||
/** | ||
* @group functional | ||
*/ | ||
class BroadwayBundleTest extends WebTestCase | ||
{ | ||
private $client; | ||
|
||
public function setUp() | ||
{ | ||
parent::setUp(); | ||
|
||
$this->client = static::createClient(); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function it_boots_the_application() | ||
{ | ||
} | ||
|
||
/** | ||
* @test regression test | ||
*/ | ||
public function it_instantiates_the_auditing_serializer() | ||
{ | ||
$this->assertInstanceOf( | ||
NullByteCommandSerializer::class, | ||
$this->client->getContainer()->get('broadway.auditing.serializer') | ||
); | ||
} | ||
|
||
/** | ||
* @test regression test | ||
*/ | ||
public function it_instantiates_the_event_dispatcher() | ||
{ | ||
$this->assertInstanceOf( | ||
EventDispatcher::class, | ||
$this->client->getContainer()->get('broadway.event_dispatcher') | ||
); | ||
} | ||
|
||
/** | ||
* @test regression test | ||
*/ | ||
public function it_instantiates_the_dbal_event_store() | ||
{ | ||
$this->assertInstanceOf( | ||
DBALEventStore::class, | ||
$this->client->getContainer()->get('broadway.event_store.dbal') | ||
); | ||
} | ||
} |
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,20 @@ | ||
framework: | ||
test: ~ | ||
secret: "CQRS stands for Command Query Responsibility Segregation" | ||
|
||
broadway: | ||
event_store: | ||
dbal: | ||
enabled: true | ||
command_handling: | ||
logger: my_logger | ||
|
||
services: | ||
my_logger: | ||
class: Monolog\Logger | ||
arguments: | ||
- "my_logger" | ||
|
||
doctrine: | ||
dbal: | ||
driver: pdo_sqlite |