public function DiskSpaceTest::testDiskSpace in Automatic Updates 8
Tests the functionality of disk space readiness checks.
File
- tests/
src/ Kernel/ ReadinessChecker/ DiskSpaceTest.php, line 27
Class
- DiskSpaceTest
- Tests disk space readiness checking.
Namespace
Drupal\Tests\automatic_updates\Kernel\ReadinessCheckerCode
public function testDiskSpace() {
// No disk space issues.
$disk_space = new DiskSpace($this->container
->get('app.root'));
$messages = $disk_space
->run();
$this
->assertEmpty($messages);
// Out of space.
$disk_space = new TestDiskSpace($this->container
->get('app.root'));
$messages = $disk_space
->run();
$this
->assertCount(2, $messages);
// Out of space not the same logical disk.
$disk_space = new TestDiskSpaceNonSameDisk($this->container
->get('app.root'));
$messages = $disk_space
->run();
$this
->assertCount(3, $messages);
}