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')); }
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')); }