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/system/src/Tests/Module/PrepareUninstallTest.php b/core/modules/system/src/Tests/Module/PrepareUninstallTest.php index dd89e31522..984b41d93e 100644 --- a/core/modules/system/src/Tests/Module/PrepareUninstallTest.php +++ b/core/modules/system/src/Tests/Module/PrepareUninstallTest.php @@ -4,7 +4,7 @@ use Drupal\Component\Utility\Unicode; use Drupal\simpletest\WebTestBase; -use Drupal\taxonomy\Tests\TaxonomyTestTrait; +use Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait; /** * Tests that modules which provide entity types can be uninstalled. 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 @@ drupalGet('taxonomy/term/' . $term->id() . '/edit'); $breadcrumbs = $this->cssSelect('nav.breadcrumb ol li a'); $this->assertIdentical(count($breadcrumbs), 2, 'The breadcrumbs are present on the page.'); - $this->assertIdentical((string) $breadcrumbs[0], 'Home', 'First breadcrumb text is Home'); - $this->assertIdentical((string) $breadcrumbs[1], $term->label(), 'Second breadcrumb text is term name on term edit page.'); - $this->assertEscaped((string) $breadcrumbs[1], 'breadcrumbs displayed and escaped.'); + $this->assertIdentical($breadcrumbs[0]->getText(), 'Home', 'First breadcrumb text is Home'); + $this->assertIdentical($breadcrumbs[1]->getText(), $term->label(), 'Second breadcrumb text is term name on term edit page.'); + $this->assertEscaped($breadcrumbs[1]->getText(), 'breadcrumbs displayed and escaped.'); // Check the breadcrumb on the term delete page. $this->drupalGet('taxonomy/term/' . $term->id() . '/delete'); $breadcrumbs = $this->cssSelect('nav.breadcrumb ol li a'); $this->assertIdentical(count($breadcrumbs), 2, 'The breadcrumbs are present on the page.'); - $this->assertIdentical((string) $breadcrumbs[0], 'Home', 'First breadcrumb text is Home'); - $this->assertIdentical((string) $breadcrumbs[1], $term->label(), 'Second breadcrumb text is term name on term delete page.'); - $this->assertEscaped((string) $breadcrumbs[1], 'breadcrumbs displayed and escaped.'); + $this->assertIdentical($breadcrumbs[0]->getText(), 'Home', 'First breadcrumb text is Home'); + $this->assertIdentical($breadcrumbs[1]->getText(), $term->label(), 'Second breadcrumb text is term name on term delete page.'); + $this->assertEscaped($breadcrumbs[1]->getText(), 'breadcrumbs displayed and escaped.'); } } diff --git a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php index c5df74dade..f331ebbd21 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php @@ -3,7 +3,7 @@ namespace Drupal\Tests\taxonomy\Functional; use Drupal\node\Entity\Node; -use Drupal\taxonomy\Tests\TaxonomyTranslationTestTrait; +use Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait; /** * Tests the translation of taxonomy terms field on nodes. diff --git a/core/modules/taxonomy/src/Tests/TermTranslationTest.php b/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php similarity index 98% rename from core/modules/taxonomy/src/Tests/TermTranslationTest.php rename to core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php index ccb16f611d..8401b76602 100644 --- a/core/modules/taxonomy/src/Tests/TermTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php @@ -1,6 +1,6 @@