Files
DesignPatternsPHP/Tests/Delegation/DelegationTest.php
2014-03-02 22:24:19 +04:00

19 lines
442 B
PHP

<?php
namespace DesignPatterns\Tests\Delegation;
use DesignPatterns\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());
}
}