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