You are here

public function UpgradeStatusUiTest::testProjectCollector in Upgrade Status 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/UpgradeStatusUiTest.php \Drupal\Tests\upgrade_status\Functional\UpgradeStatusUiTest::testProjectCollector()

Test project collection's result by checking the amount of projects.

File

tests/src/Functional/UpgradeStatusUiTest.php, line 127

Class

UpgradeStatusUiTest
Tests the UI before and after running scans.

Namespace

Drupal\Tests\upgrade_status\Functional

Code

public function testProjectCollector() {
  $this
    ->drupalGet(Url::fromRoute('upgrade_status.report'));
  $page = $this
    ->getSession()
    ->getPage();
  $this
    ->assertCount(3, $page
    ->findAll('css', '.upgrade-status-summary-custom tr[class*=\'project-\']'));
  $this
    ->assertCount(4, $page
    ->findAll('css', '.upgrade-status-summary-contrib tr[class*=\'project-\']'));
}