Loading core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public function testMigration() { $this->assertSame('The first comment.', $comment->getSubject()); $this->assertSame('The first comment body.', $comment->comment_body->value); $this->assertSame('filtered_html', $comment->comment_body->format); $this->assertSame(NULL, $comment->pid->target_id); $this->assertNull($comment->pid->target_id); $this->assertSame('1', $comment->getCommentedEntityId()); $this->assertSame('node', $comment->getCommentedEntityTypeId()); $this->assertSame('en', $comment->language()->getId()); Loading @@ -84,7 +84,7 @@ public function testMigration() { $comment = Comment::load(3); $this->assertSame('The second comment.', $comment->subject->value); $this->assertSame(NULL, $comment->pid->target_id); $this->assertNull($comment->pid->target_id); $this->assertSame('203.0.113.3', $comment->getHostname()); $node = $comment->getCommentedEntity(); Loading core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php +8 −8 Original line number Diff line number Diff line Loading @@ -39,18 +39,18 @@ public function testSystemSite() { $config_translation = $language_manager->getLanguageConfigOverride('fr', 'system.site'); $this->assertSame('The Site Name', $config_translation->get('name')); $this->assertSame('fr - The Slogan', $config_translation->get('slogan')); $this->assertSame(NULL, $config_translation->get('page.403')); $this->assertSame(NULL, $config_translation->get('page.404')); $this->assertSame(NULL, $config_translation->get('page.front')); $this->assertSame(NULL, $config_translation->get('admin_compact_mode')); $this->assertNull($config_translation->get('page.403')); $this->assertNull($config_translation->get('page.404')); $this->assertNull($config_translation->get('page.front')); $this->assertNull($config_translation->get('admin_compact_mode')); $config_translation = $language_manager->getLanguageConfigOverride('is', 'system.site'); $this->assertSame('is - The Site Name', $config_translation->get('name')); $this->assertSame('is - The Slogan', $config_translation->get('slogan')); $this->assertSame(NULL, $config_translation->get('page.403')); $this->assertSame(NULL, $config_translation->get('page.404')); $this->assertSame(NULL, $config_translation->get('page.front')); $this->assertNULL($config_translation->get('admin_compact_mode')); $this->assertNull($config_translation->get('page.403')); $this->assertNull($config_translation->get('page.404')); $this->assertNull($config_translation->get('page.front')); $this->assertNull($config_translation->get('admin_compact_mode')); } } core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -385,12 +385,12 @@ public function testGetWeight() { */ public function testPopulateFromRouteMatch() { // Make sure the language code is not set initially. $this->assertSame(NULL, $this->configNamesMapper->getInternalLangcode()); $this->assertNull($this->configNamesMapper->getInternalLangcode()); // Test that an empty request does not set the language code. $route_match = new RouteMatch('example', new Route('/test/{langcode}')); $this->configNamesMapper->populateFromRouteMatch($route_match); $this->assertSame(NULL, $this->configNamesMapper->getInternalLangcode()); $this->assertNull($this->configNamesMapper->getInternalLangcode()); // Test that a request with a 'langcode' attribute sets the language code. $route_match = new RouteMatch('example', new Route('/test/{langcode}'), ['langcode' => 'xx']); Loading @@ -400,7 +400,7 @@ public function testPopulateFromRouteMatch() { // Test that the language code gets unset with the wrong request. $route_match = new RouteMatch('example', new Route('/test/{langcode}')); $this->configNamesMapper->populateFromRouteMatch($route_match); $this->assertSame(NULL, $this->configNamesMapper->getInternalLangcode()); $this->assertNull($this->configNamesMapper->getInternalLangcode()); } /** Loading core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public function testRead() { // 8b. Single related item, empty. $single_output = Json::decode($this->drupalGet('/jsonapi/node/article/' . $uuid . '/field_heroless')); $this->assertSession()->statusCodeEquals(200); $this->assertSame(NULL, $single_output['data']); $this->assertNull($single_output['data']); // 9. Related tags with includes. $single_output = Json::decode($this->drupalGet('/jsonapi/node/article/' . $uuid . '/field_tags', [ 'query' => ['include' => 'vid'], Loading core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -92,18 +92,18 @@ public function testGetLangcode() { $languageNegotiationContentEntity->setLanguageManager($this->languageManager); // Case 1: NULL request object argument. $this->assertSame(NULL, $languageNegotiationContentEntity->getLangcode()); $this->assertNull($languageNegotiationContentEntity->getLangcode()); // Case 2: A request object is available, but the languageManager is not // set. $request = Request::create('/foo', 'GET'); $this->assertSame(NULL, $languageNegotiationContentEntity->getLangcode($request)); $this->assertNull($languageNegotiationContentEntity->getLangcode($request)); // Case 3: A request object is available, but static::QUERY_PARAMETER is // set to a non-enabled language. $request = Request::create('/foo', 'GET', [LanguageNegotiationContentEntity::QUERY_PARAMETER => 'it']); $this->assertSame(NULL, $languageNegotiationContentEntity->getLangcode($request)); $this->assertNull($languageNegotiationContentEntity->getLangcode($request)); // Case 4: A request object is available and static::QUERY_PARAMETER is // set to an enabled language. Loading Loading
core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public function testMigration() { $this->assertSame('The first comment.', $comment->getSubject()); $this->assertSame('The first comment body.', $comment->comment_body->value); $this->assertSame('filtered_html', $comment->comment_body->format); $this->assertSame(NULL, $comment->pid->target_id); $this->assertNull($comment->pid->target_id); $this->assertSame('1', $comment->getCommentedEntityId()); $this->assertSame('node', $comment->getCommentedEntityTypeId()); $this->assertSame('en', $comment->language()->getId()); Loading @@ -84,7 +84,7 @@ public function testMigration() { $comment = Comment::load(3); $this->assertSame('The second comment.', $comment->subject->value); $this->assertSame(NULL, $comment->pid->target_id); $this->assertNull($comment->pid->target_id); $this->assertSame('203.0.113.3', $comment->getHostname()); $node = $comment->getCommentedEntity(); Loading
core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php +8 −8 Original line number Diff line number Diff line Loading @@ -39,18 +39,18 @@ public function testSystemSite() { $config_translation = $language_manager->getLanguageConfigOverride('fr', 'system.site'); $this->assertSame('The Site Name', $config_translation->get('name')); $this->assertSame('fr - The Slogan', $config_translation->get('slogan')); $this->assertSame(NULL, $config_translation->get('page.403')); $this->assertSame(NULL, $config_translation->get('page.404')); $this->assertSame(NULL, $config_translation->get('page.front')); $this->assertSame(NULL, $config_translation->get('admin_compact_mode')); $this->assertNull($config_translation->get('page.403')); $this->assertNull($config_translation->get('page.404')); $this->assertNull($config_translation->get('page.front')); $this->assertNull($config_translation->get('admin_compact_mode')); $config_translation = $language_manager->getLanguageConfigOverride('is', 'system.site'); $this->assertSame('is - The Site Name', $config_translation->get('name')); $this->assertSame('is - The Slogan', $config_translation->get('slogan')); $this->assertSame(NULL, $config_translation->get('page.403')); $this->assertSame(NULL, $config_translation->get('page.404')); $this->assertSame(NULL, $config_translation->get('page.front')); $this->assertNULL($config_translation->get('admin_compact_mode')); $this->assertNull($config_translation->get('page.403')); $this->assertNull($config_translation->get('page.404')); $this->assertNull($config_translation->get('page.front')); $this->assertNull($config_translation->get('admin_compact_mode')); } }
core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -385,12 +385,12 @@ public function testGetWeight() { */ public function testPopulateFromRouteMatch() { // Make sure the language code is not set initially. $this->assertSame(NULL, $this->configNamesMapper->getInternalLangcode()); $this->assertNull($this->configNamesMapper->getInternalLangcode()); // Test that an empty request does not set the language code. $route_match = new RouteMatch('example', new Route('/test/{langcode}')); $this->configNamesMapper->populateFromRouteMatch($route_match); $this->assertSame(NULL, $this->configNamesMapper->getInternalLangcode()); $this->assertNull($this->configNamesMapper->getInternalLangcode()); // Test that a request with a 'langcode' attribute sets the language code. $route_match = new RouteMatch('example', new Route('/test/{langcode}'), ['langcode' => 'xx']); Loading @@ -400,7 +400,7 @@ public function testPopulateFromRouteMatch() { // Test that the language code gets unset with the wrong request. $route_match = new RouteMatch('example', new Route('/test/{langcode}')); $this->configNamesMapper->populateFromRouteMatch($route_match); $this->assertSame(NULL, $this->configNamesMapper->getInternalLangcode()); $this->assertNull($this->configNamesMapper->getInternalLangcode()); } /** Loading
core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public function testRead() { // 8b. Single related item, empty. $single_output = Json::decode($this->drupalGet('/jsonapi/node/article/' . $uuid . '/field_heroless')); $this->assertSession()->statusCodeEquals(200); $this->assertSame(NULL, $single_output['data']); $this->assertNull($single_output['data']); // 9. Related tags with includes. $single_output = Json::decode($this->drupalGet('/jsonapi/node/article/' . $uuid . '/field_tags', [ 'query' => ['include' => 'vid'], Loading
core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -92,18 +92,18 @@ public function testGetLangcode() { $languageNegotiationContentEntity->setLanguageManager($this->languageManager); // Case 1: NULL request object argument. $this->assertSame(NULL, $languageNegotiationContentEntity->getLangcode()); $this->assertNull($languageNegotiationContentEntity->getLangcode()); // Case 2: A request object is available, but the languageManager is not // set. $request = Request::create('/foo', 'GET'); $this->assertSame(NULL, $languageNegotiationContentEntity->getLangcode($request)); $this->assertNull($languageNegotiationContentEntity->getLangcode($request)); // Case 3: A request object is available, but static::QUERY_PARAMETER is // set to a non-enabled language. $request = Request::create('/foo', 'GET', [LanguageNegotiationContentEntity::QUERY_PARAMETER => 'it']); $this->assertSame(NULL, $languageNegotiationContentEntity->getLangcode($request)); $this->assertNull($languageNegotiationContentEntity->getLangcode($request)); // Case 4: A request object is available and static::QUERY_PARAMETER is // set to an enabled language. Loading