public function testFindOneDashboardModelByEmpty() { $criteria = array('label' => 'Foo'); $orderBy = array('label' => 'ASC'); $this->dashboardRepository->expects($this->once())->method('findOneBy')->with($criteria, $orderBy)->will($this->returnValue(null)); $this->assertNull($this->manager->findOneDashboardModelBy($criteria, $orderBy)); }
public function testDelete() { $dashboard = $this->dashboardManager->findOneDashboardModelBy(['name' => 'main']); $this->assertNotNull($dashboard); $this->client->request('DELETE', $this->getUrl('oro_api_delete_dashboard', ['id' => $dashboard->getId()]), [], [], $this->generateWsseAuthHeader(LoadUserData::USER_NAME, LoadUserData::USER_PASSWORD)); $result = $this->client->getResponse(); $this->assertJsonResponseStatusCodeEquals($result, 403); $this->assertNotNull($dashboard); }