phpunit test: drupalGet a public node returns 404 Simply trying to get a node.

$this-&gt;drupalGet('node/25250');
$this-&gt;assertSession()-&gt;statusCodeEquals(200);


But this returns 404. I can browse to that node anonymously. Why is it returning 404?
BrowserTestBase do not run against your installation, they do a new installation and then run against that.

There is no content, no modules, pretty much nothing there by default, everything you need to need to create and install.

If you're looking for a way to run tests against your installation, you might be able to override the set up and tear down process. Or look at using behat: http://behat-drupal-extension.readthedocs.io/en/latest/intro.html