public function testNoFirewall() { $this->sc->shouldReceive('getToken')->andReturnNull(); $this->sc->shouldNotReceive('isGranted'); $this->adm->shouldReceive('decide')->once()->with(\Mockery::type('Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken'), array(PublishWorkflowChecker::VIEW_ATTRIBUTE), $this->doc)->andReturn(true); $this->assertTrue($this->pwfc->isGranted(PublishWorkflowChecker::VIEW_ATTRIBUTE, $this->doc)); }