Add Cache test case

This commit is contained in:
Gaozhen Ying
2017-09-18 21:19:39 +08:00
committed by ThinkPHP
parent 55c81e0407
commit b673555aab
4 changed files with 317 additions and 9 deletions

View File

@@ -11,15 +11,8 @@ class instanceTest extends \PHPUnit_Framework_TestCase
$this->assertInstanceOf('\tests\thinkphp\library\traits\think\InstanceTestFather', $father);
$this->assertEquals([], $father->options);
$father2 = InstanceTestFather::instance(['father']);
$this->assertEquals([], $father2->options);
$father2->options = ['father'];
$this->assertEquals(['father'], $father->options);
$son = InstanceTestSon::instance(['son']);
$this->assertInstanceOf('\tests\thinkphp\library\traits\think\InstanceTestFather', $son);
$this->assertEquals(['father'], $son->options);
$son = InstanceTestFather::instance(['son']);
$this->assertSame($father, $son);
}
public function testCallStatic()