function MigrateSqlSourceTestCase::testSourceCount

Tests that the source returns the row count expected.

File

core/modules/migrate/tests/src/Unit/MigrateSqlSourceTestCase.php, line 150

Class

MigrateSqlSourceTestCase
Base class for Migrate module source unit tests.

Namespace

Drupal\Tests\migrate\Unit

Code

public function testSourceCount() {
    $count = $this->source
        ->count();
    $this->assertTrue(is_numeric($count));
    $this->assertEquals($this->expectedCount, $count);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.