Esempio n. 1
0
 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'));
 }
Esempio n. 2
0
 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'));
 }