function TestBaseTest::testRandomObject
@covers ::randomObject @dataProvider providerRandomItems
File
-
core/
modules/ simpletest/ tests/ src/ Unit/ TestBaseTest.php, line 127
Class
- TestBaseTest
- @requires extension curl @coversDefaultClass \Drupal\simpletest\TestBase @group simpletest @group TestBase
Namespace
Drupal\Tests\simpletest\UnitCode
public function testRandomObject($size) {
$test_base = $this->getTestBaseForAssertionTests('test_id');
// Note: count((array)object) works for now, maybe not later.
$this->assertEquals($size, count((array) $test_base->randomObject($size)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.