Laravel Homestead中的PHPUnit测试失败

I have a fresh clone of laravel/framework:master running on a Homestead VM (on Mac host). I installed the dependencies (composer install - also composer update). When I run the tests I get

There were 2 failures:

 1) FilesystemTest::testIsReadable Failed asserting that true is false.

 /home/vagrant/Code/project/vendor/laravel/framework/tests/Filesystem/FilesystemTest.php:305

 2) ValidationValidatorTest::testValidateActiveUrl Failed asserting that false is true.

 /home/vagrant/Code/project/vendor/laravel/framework/tests/Validation/ValidationValidatorTest.php:1825

$ php -v
PHP 7.1.0-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.1.0-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
    with blackfire v1.14.1~linux-x64-non_zts71, https://blackfire.io, by Blackfireio Inc.

$ phpunit --version
PHPUnit 5.7.5 by Sebastian Bergmann and contributors.

Am I missing something?


Update

I answered my own question with the workarounds I found for these problems, although I don't fully understand them. Particularly I don't know if these issues were somehow special to my setup or instead are common and to be expected, in which case I wonder why the default Homestead configuration doesn't address them.

I'm leaving the question open for a while, in case anyone wants to explain or comment.

I found that there was an exception being thrown on dns_get_record (called in active_url validation). Thanks to this issue I learnt that setting the natdnshostresolver option to "off" could solve it for me.

On the first failing test, after chmod 000 a file, the assertion expected the file not to be readable. But it always stayed readable. It then occurred to me that I was doing the tests on a folder which was synced on the host machine. (Maybe it can't remove the read permission there?). I tried again from a non-synced folder and the test passed.