void () { final VirtualFile vFile1 = myFixture.addFileToProject("dir1/foo.test", "Foo").getVirtualFile(); final VirtualFile vFile2 = myFixture.addFileToProject("dir2/FOO.TEST", "Foo").getVirtualFile(); GlobalSearchScope scope = GlobalSearchScope.projectScope(getProject()); assertSameElements(FilenameIndex.getVirtualFilesByName(getProject(), "foo.test", true, scope), vFile1); assertSameElements(FilenameIndex.getVirtualFilesByName(getProject(), "FOO.TEST", true, scope), vFile2); assertSameElements(FilenameIndex.getVirtualFilesByName(getProject(), "foo.test", false, scope), vFile1, vFile2); assertSameElements(FilenameIndex.getVirtualFilesByName(getProject(), "FOO.TEST", false, scope), vFile1, vFile2); }