OptionsDynamicValuesApiTest.php in Zircon Profile 8
File
core/modules/options/src/Tests/OptionsDynamicValuesApiTest.php
View source
<?php
namespace Drupal\options\Tests;
class OptionsDynamicValuesApiTest extends OptionsDynamicValuesTestBase {
public function testOptionsAllowedValues() {
$values = options_allowed_values($this->fieldStorage);
$this
->assertEqual([], $values);
$values = options_allowed_values($this->fieldStorage, $this->entity);
$expected_values = array(
$this->entity
->label(),
$this->entity
->url(),
$this->entity
->uuid(),
$this->entity
->bundle(),
);
$expected_values = array_combine($expected_values, $expected_values);
$this
->assertEqual($expected_values, $values);
}
}