public function TestBaseTest::testRandomObject in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/simpletest/tests/src/Unit/TestBaseTest.php \Drupal\Tests\simpletest\Unit\TestBaseTest::testRandomObject()
@covers ::randomObject @dataProvider providerRandomItems
File
- core/
modules/ simpletest/ tests/ src/ Unit/ TestBaseTest.php, line 130 - Contains \Drupal\Tests\simpletest\Unit\TestBaseTest.
Class
- TestBaseTest
- @coversDefaultClass \Drupal\simpletest\TestBase @group simpletest
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)));
}