public function VendorTest::testVendor in Automatic Updates 8
Tests vendor folder existing.
File
- tests/
src/ Kernel/ ReadinessChecker/ VendorTest.php, line 28
Class
- VendorTest
- Tests locating vendor folder.
Namespace
Drupal\Tests\automatic_updates\Kernel\ReadinessCheckerCode
public function testVendor() {
$vendor = $this->container
->get('automatic_updates.vendor');
$this
->assertEmpty($vendor
->run());
vfsStream::setup('root');
vfsStream::create([
'core' => [
'core.api.php' => 'test',
],
]);
$missing_vendor = new Vendor(vfsStream::url('root'));
$this
->assertEquals([], $vendor
->run());
$expected_messages = [
$this
->t('The vendor folder could not be located.'),
];
self::assertEquals($expected_messages, $missing_vendor
->run());
}