Mercurial > hg > isophonics-drupal-site
view core/modules/options/tests/src/Functional/OptionsDynamicValuesApiTest.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children | af1871eacc83 |
line wrap: on
line source
<?php namespace Drupal\Tests\options\Functional; /** * Tests the options allowed values api. * * @group options */ class OptionsDynamicValuesApiTest extends OptionsDynamicValuesTestBase { /** * Tests options_allowed_values(). * * @see options_test_dynamic_values_callback() */ public function testOptionsAllowedValues() { // Test allowed values without passed $items. $values = options_allowed_values($this->fieldStorage); $this->assertEqual([], $values); $values = options_allowed_values($this->fieldStorage, $this->entity); $expected_values = [ $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); } }