- heddn Nicaragua
Some comments posted below on the code. As far as tests, we are constantly attempting to increase test coverage. Functional tests can mock guzzle responses or work with real test endpoints. Meaning, you could create a test controller/form in a test module that returns all the expected outputs.
-
+++ b/src/Plugin/migrate_plus/authentication/Cookie.php @@ -0,0 +1,106 @@ + * Provides cookie authentication for the HTTP resource to another Drupal 8 site.
Let's not put versions in comments. Makes maintenance easier if we don't have to keep abreast of versions in the code.
-
+++ b/src/Plugin/migrate_plus/authentication/Cookie.php @@ -0,0 +1,106 @@ + 'base_url' => $this->configuration['domain'],
if we make this a "url" config option, then we can divine the domain name from it.
-
+++ b/src/Plugin/migrate_plus/authentication/Cookie.php @@ -0,0 +1,106 @@ + $loginClient->post($this->configuration['domain'] . '/user/login', [
can we make this more drupal agnostic and have the url be to the login URL?
-
+++ b/src/Plugin/migrate_plus/authentication/Cookie.php @@ -0,0 +1,106 @@ + if ($this->configuration['rest']) {
this is very tied to drupal paths. more generic is better as it become more usable across different scenarios.
-