diff --git a/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php index 41a03657af..629c4aa810 100644 --- a/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php +++ b/core/modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php @@ -3,7 +3,7 @@ namespace Drupal\Tests\rdf\Functional; use Drupal\Core\Field\FieldStorageDefinitionInterface; -use Drupal\taxonomy\Tests\TaxonomyTestBase; +use Drupal\Tests\taxonomy\Functional\TaxonomyTestBase; /** * Tests RDFa markup generation for taxonomy term fields. diff --git a/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php b/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php index ea74ce5c27..346ffb7eb9 100644 --- a/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php +++ b/core/modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php @@ -2,7 +2,7 @@ namespace Drupal\Tests\rdf\Functional; -use Drupal\taxonomy\Tests\TaxonomyTestBase; +use Drupal\Tests\taxonomy\Functional\TaxonomyTestBase; /** * Tests the RDFa markup of Taxonomy terms. diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php index 838a9b02c9..b4f941da5b 100644 --- a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php +++ b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php @@ -2,8 +2,11 @@ namespace Drupal\taxonomy\Tests; +@trigger_error(__NAMESPACE__ . '\TaxonomyTestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\taxonomy\Functional\TaxonomyTestBase', E_USER_DEPRECATED); + use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait; use Drupal\simpletest\WebTestBase; +use Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait; /** * Provides common helper methods for Taxonomy module tests. diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php b/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php index 744ab1b28b..8c4a667270 100644 --- a/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php +++ b/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php @@ -2,6 +2,8 @@ namespace Drupal\taxonomy\Tests; +@trigger_error(__NAMESPACE__ . '\TaxonomyTestTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait', E_USER_DEPRECATED); + use Drupal\Component\Utility\Unicode; use Drupal\Core\Language\LanguageInterface; use Drupal\taxonomy\Entity\Vocabulary; @@ -9,6 +11,9 @@ /** * Provides common helper methods for Taxonomy module tests. + * + * @deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. + * Use \Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait */ trait TaxonomyTestTrait { diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTranslationTestTrait.php b/core/modules/taxonomy/src/Tests/TaxonomyTranslationTestTrait.php index 3607fc6b0a..644211714a 100644 --- a/core/modules/taxonomy/src/Tests/TaxonomyTranslationTestTrait.php +++ b/core/modules/taxonomy/src/Tests/TaxonomyTranslationTestTrait.php @@ -2,6 +2,8 @@ namespace Drupal\taxonomy\Tests; +@trigger_error(__NAMESPACE__ . '\TaxonomyTranslationTestTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait', E_USER_DEPRECATED); + use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait; use Drupal\field\Entity\FieldStorageConfig; @@ -9,6 +11,9 @@ /** * Provides common testing base for translated taxonomy terms. + * + * @deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. + * Use \Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait */ trait TaxonomyTranslationTestTrait { diff --git a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php similarity index 94% rename from core/modules/taxonomy/src/Tests/TaxonomyImageTest.php rename to core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php index 7d2ee2b639..504c0da6c4 100644 --- a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php @@ -1,8 +1,9 @@ xpath('//a[@href="' . $this->term1->url() . '"]'); $this->assertEqual(count($actual), 2, 'Correct number of taxonomy term1 links'); - $this->assertEqual($actual[0]->__toString(), $this->term1->label()); - $this->assertEqual($actual[1]->__toString(), $this->term1->label()); + $this->assertEqual($actual[0]->getText(), $this->term1->label()); + $this->assertEqual($actual[1]->getText(), $this->term1->label()); $this->assertEscaped($this->term1->label()); $actual = $this->xpath('//a[@href="' . $this->term2->url() . '"]'); $this->assertEqual(count($actual), 2, 'Correct number of taxonomy term2 links'); - $this->assertEqual($actual[0]->__toString(), $this->term2->label()); - $this->assertEqual($actual[1]->__toString(), $this->term2->label()); + $this->assertEqual($actual[0]->getText(), $this->term2->label()); + $this->assertEqual($actual[1]->getText(), $this->term2->label()); } /** diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldFilterTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php similarity index 96% rename from core/modules/taxonomy/src/Tests/Views/TaxonomyFieldFilterTest.php rename to core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php index 86f67ff3de..1b8bbcaa51 100644 --- a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldFilterTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php @@ -1,11 +1,11 @@ save(); diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldTidTest.php similarity index 94% rename from core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php rename to core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldTidTest.php index b068f083a1..0a44d4cb2e 100644 --- a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldTidTest.php @@ -1,6 +1,6 @@ term1->set('parent', $this->term2->id()); diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyTermArgumentDepthTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php similarity index 89% rename from core/modules/taxonomy/src/Tests/Views/TaxonomyTermArgumentDepthTest.php rename to core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php index 311118dfea..3505784a07 100644 --- a/core/modules/taxonomy/src/Tests/Views/TaxonomyTermArgumentDepthTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php @@ -1,6 +1,6 @@ createTerm(['name' => 'First']); diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyTermFilterDepthTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php similarity index 96% rename from core/modules/taxonomy/src/Tests/Views/TaxonomyTermFilterDepthTest.php rename to core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php index 10ccad260e..4d7a4fdf03 100644 --- a/core/modules/taxonomy/src/Tests/Views/TaxonomyTermFilterDepthTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermFilterDepthTest.php @@ -1,6 +1,6 @@ adminUser = $this->drupalCreateUser(['administer taxonomy', 'bypass node access']); diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php similarity index 97% rename from core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php rename to core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php index 6ff5514188..a2d8ec14a3 100644 --- a/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php @@ -1,11 +1,11 @@ vocabularies[] = $this->vocabulary; diff --git a/core/modules/taxonomy/src/Tests/Views/TermNameFieldTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php similarity index 96% rename from core/modules/taxonomy/src/Tests/Views/TermNameFieldTest.php rename to core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php index 98d1ab4b48..6fbe0c0b2b 100644 --- a/core/modules/taxonomy/src/Tests/Views/TermNameFieldTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php @@ -1,6 +1,6 @@ config('system.site')->get('name'); $this->assertTitle(t('Don\'t Panic | @site-name', ['@site-name' => $site_name]), 'The page title contains the escaped character.'); - $this->assertNoTitle(t('Don't Panic | @site-name', ['@site-name' => $site_name]), 'The page title does not contain an encoded character.'); } /** diff --git a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php index 0d70d840da..832e5111bf 100644 --- a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php @@ -4,7 +4,7 @@ use Drupal\taxonomy\Entity\Term; use Drupal\KernelTests\KernelTestBase; -use Drupal\taxonomy\Tests\TaxonomyTestTrait; +use Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait; /** * Kernel tests for taxonomy term functions. diff --git a/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php b/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php index c34e6f2a02..fbf5f41458 100644 --- a/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php +++ b/core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php @@ -2,7 +2,7 @@ namespace Drupal\Tests\views\Functional; -use Drupal\taxonomy\Tests\TaxonomyTestTrait; +use Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait; /** * Tests glossary functionality of taxonomy views.