Пример #1
0
 public function testFindDefaultDashboardEmpty()
 {
     $organization = new Organization();
     $token = $this->getMockBuilder('Oro\\Bundle\\SecurityBundle\\Authentication\\Token\\UsernamePasswordOrganizationToken')->disableOriginalConstructor()->getMock();
     $this->securityContext->expects($this->once())->method('getToken')->will($this->returnValue($token));
     $token->expects($this->once())->method('getOrganizationContext')->will($this->returnValue($organization));
     $this->dashboardRepository->expects($this->once())->method('findDefaultDashboard')->will($this->returnValue(null));
     $this->factory->expects($this->never())->method($this->anything());
     $this->assertNull($this->manager->findDefaultDashboard());
 }