faker->word(); $fs = Storage::fake($this->faker->word()); $fs->makeDirectory($directory); $rule = new StorageDirectoryExistsRule($fs); static::assertTrue($rule->passes($this->faker->word(), $directory)); } /** * The Storage Directory Exists Rule shall return false if the directory does not exist in the filesystem. * * @return void */ public function testFailsIfDirectoryDoesNotExist(): void { $fs = Storage::fake($this->faker->word()); $rule = new StorageDirectoryExistsRule($fs); static::assertFalse($rule->passes($this->faker->word(), $this->faker->word())); } }