コード例 #1
0
ファイル: StackTest.php プロジェクト: aaleksu/bolt_cm
 public function testDuplicates()
 {
     $app = $this->getApp();
     $users = $this->getMock('Bolt\\Users', array('getCurrentUser', 'saveUser'), array($app));
     $app['users'] = $users;
     $stack = new Stack($app);
     $stack->add('mytestfile');
     $stack->add('mytestfile');
     $this->assertTrue($stack->isOnStack('mytestfile'));
 }
コード例 #2
0
ファイル: StackTest.php プロジェクト: atiarda/bolt
 public function testDuplicates()
 {
     $app = $this->getApp();
     $users = $this->getMock('Bolt\\Users', ['getCurrentUser', 'saveUser'], [$app]);
     $app['users'] = $users;
     $app['session']->set('stack', []);
     $stack = new Stack($app);
     $stack->add('mytestfile');
     $stack->add('mytestfile');
     $this->assertTrue($stack->isOnStack('mytestfile'));
 }