HM\BackUpWordPress\Backup_Engine_Excludes::test_excluded_file_directly_is_excluded PHP Method

test_excluded_file_directly_is_excluded() public method

Main test: Excludes->is_file_excluded( $file ) Expected: true.
    public function test_excluded_file_directly_is_excluded()
    {
        $file_path = $this->test_data . '/test-data.txt';
        $file = new \SplFileInfo($file_path);
        // Check the file is created and its size is NOT 0.
        $this->assertContains($this->root->getPath(), $file->getPath());
        $this->assertNotSame($file->getSize(), 0);
        // Exclude file directly.
        $excluded_file = new Excludes($file_path);
        // Check the file is excluded - true.
        $this->assertContains(basename($file->getPathname()), $excluded_file->get_user_excludes());
        $this->assertTrue($excluded_file->is_file_excluded($file));
    }