added plugin screen (#671)

This commit is contained in:
Kevin Papst
2019-04-08 18:38:56 +02:00
committed by GitHub
parent 5bea9915f5
commit 3a4aa5a001
68 changed files with 1392 additions and 490 deletions

View File

@@ -202,6 +202,23 @@ abstract class ControllerBaseTest extends WebTestCase
$this->assertEquals($count, $node->count());
}
/**
* @param Client $client
* @param array $buttons
*/
protected function assertPageActions(Client $client, array $buttons)
{
$node = $client->getCrawler()->filter('section.content-header div.breadcrumb div.box-tools div.btn-group a.btn');
$this->assertEquals(count($buttons), $node->count());
foreach ($node->getIterator() as $element) {
$expectedClass = str_replace('btn btn-default btn-', '', $element->getAttribute('class'));
$this->assertArrayHasKey($expectedClass, $buttons);
$expectedUrl = $buttons[$expectedClass];
$this->assertEquals($expectedUrl, $element->getAttribute('href'));
}
}
/**
* @param string $role the USER role to use for the request
* @param string $url the URL of the page displaying the initial form to submit