faker->word()); $file = File::fake()->create($this->faker->word()); $path = $fs->putFile($this->faker->word(), $file); $rule = new StorageFileDirectoryExistsRule($fs); static::assertTrue($rule->passes($this->faker->word(), $path)); } /** * The Storage File 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 StorageFileDirectoryExistsRule($fs); static::assertFalse($rule->passes($this->faker->word(), $this->faker->filePath())); } }