What is the quickest way to dump a node to insert into a test case?
You can use drush:
drush ev &quot;var_export(\Drupal\node\Entity\Node::load(123)-&gt;toArray());&quot;

and delete stuff you don't need like uuid, revision_*, ...
By the way if you are wondering why does this output old style array syntax, see https://stackoverflow.com/questions/24316347/how-to-format-var-export-to-php5-4-array-syntax
... or paste the output into your IDE and configure it to autocorrect the format.