mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +01:00
19 lines
452 B
PHP
19 lines
452 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\More\Delegation\Tests;
|
|
|
|
use DesignPatterns\More\Delegation;
|
|
|
|
/**
|
|
* DelegationTest tests the delegation pattern
|
|
*/
|
|
class DelegationTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testHowTeamLeadWriteCode()
|
|
{
|
|
$junior = new Delegation\JuniorDeveloper();
|
|
$teamLead = new Delegation\TeamLead($junior);
|
|
$this->assertEquals($junior->writeBadCode(), $teamLead->writeCode());
|
|
}
|
|
}
|