public function testHelperReturnsNullIfNoIdentity() { $auth = $this->getAuthMock(); $auth->expects($this->once())->method('hasIdentity')->will($this->returnValue(false)); $helper = new Auth(); $helper->setService($auth); $this->assertNull($helper->__invoke('test')); }