Skip to content

Commit

Permalink
test cached app instance
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Feb 26, 2015
1 parent 676aa68 commit e36cd5d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/BootstrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use BEAR\AppMeta\AppMeta;
use BEAR\Sunday\Extension\Application\AppInterface;
use Doctrine\Common\Cache\ArrayCache;
use Doctrine\Common\Cache\FilesystemCache;
use FakeVendor\HelloWorld\Module\AppModule;

class BootstrapTest extends \PHPUnit_Framework_TestCase
Expand Down Expand Up @@ -33,4 +34,11 @@ public function testContextCacheModule()
$app = (new Bootstrap)->newApp(new AppMeta('FakeVendor\HelloWorld'), 'app');
$this->assertInstanceOf(AppInterface::class, $app);
}

public function testCache()
{
$app1 = (new Bootstrap)->newApp(new AppMeta('FakeVendor\HelloWorld'), 'cli-app', new FilesystemCache(__DIR__ . '/tmp'));
$app2 = (new Bootstrap)->newApp(new AppMeta('FakeVendor\HelloWorld'), 'cli-app', new FilesystemCache(__DIR__ . '/tmp'));
$this->assertSame(serialize($app1), serialize($app2));
}
}

0 comments on commit e36cd5d

Please sign in to comment.