Added basic API endpoints (#258)

This commit is contained in:
Kevin Papst
2018-08-08 23:10:45 +02:00
committed by GitHub
parent a7780dac9e
commit 2f84f3751a
59 changed files with 3207 additions and 297 deletions

View File

@@ -52,15 +52,13 @@ class UserControllerTest extends ControllerBaseTest
$this->assertIsRedirect($client, $this->createUrl('/profile/' . urlencode($username) . '/edit'));
$client->followRedirect();
$expectedTabs = ['#charts', '#settings', '#password', '#api-token', '#roles'];
$tabs = $client->getCrawler()->filter('div.nav-tabs-custom ul.nav-tabs li');
$this->assertEquals(4, $tabs->count());
$expectedTabs = ['#charts', '#settings', '#password', '#roles'];
$this->assertEquals(count($expectedTabs), $tabs->count());
$foundTabs = [];
foreach ($tabs->filter('a') as $tab) {
$name = $tab->getAttribute('href');
if (in_array($name, $expectedTabs)) {
$foundTabs[] = $name;
}
$foundTabs[] = $tab->getAttribute('href');
}
$this->assertEmpty(array_diff($expectedTabs, $foundTabs));