mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-25 10:43:44 +02:00
18 lines
565 B
PHP
18 lines
565 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\Structural\DependencyInjection\Tests;
|
|
|
|
use DesignPatterns\Structural\DependencyInjection\DatabaseConfiguration;
|
|
use DesignPatterns\Structural\DependencyInjection\DatabaseConnection;
|
|
|
|
class DependencyInjectionTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testDependencyInjection()
|
|
{
|
|
$config = new DatabaseConfiguration('localhost', 3306, 'domnikl', '1234');
|
|
$connection = new DatabaseConnection($config);
|
|
|
|
$this->assertEquals('domnikl:1234@localhost:3306', $connection->getDsn());
|
|
}
|
|
}
|