mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-17 05:11:18 +02:00
26 lines
590 B
PHP
26 lines
590 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\Structural\Proxy\Tests;
|
|
|
|
use DesignPatterns\Structural\Proxy\RecordProxy;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class ProxyTest extends TestCase
|
|
{
|
|
public function testWillSetDirtyFlagInProxy()
|
|
{
|
|
$recordProxy = new RecordProxy([]);
|
|
$recordProxy->username = 'baz';
|
|
|
|
$this->assertTrue($recordProxy->isDirty());
|
|
}
|
|
|
|
public function testProxyIsInstanceOfRecord()
|
|
{
|
|
$recordProxy = new RecordProxy([]);
|
|
$recordProxy->username = 'baz';
|
|
|
|
$this->assertInstanceOf(RecordProxy::class, $recordProxy);
|
|
}
|
|
}
|