mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-10 09:56:24 +02:00
26 lines
636 B
PHP
26 lines
636 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\Structural\Proxy\Tests;
|
|
|
|
use DesignPatterns\Structural\Decorator;
|
|
use DesignPatterns\Structural\Proxy\RecordProxy;
|
|
|
|
class ProxyTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testWillSetDirtyFlagInProxy()
|
|
{
|
|
$recordProxy = new RecordProxy([]);
|
|
$recordProxy->foobar = 'baz';
|
|
|
|
$this->assertTrue($recordProxy->isDirty());
|
|
}
|
|
|
|
public function testProxyIsInstanceOfRecord()
|
|
{
|
|
$recordProxy = new RecordProxy([]);
|
|
$recordProxy->foobar = 'baz';
|
|
|
|
$this->assertInstanceOf('DesignPatterns\Structural\Proxy\Record', $recordProxy);
|
|
}
|
|
}
|