Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ignoreVCSIgnored example
if
(
\
ini_get
(
'open_basedir'
)
)
{
$this
->
markTestSkipped
(
'Cannot test when open_basedir is set'
)
;
}
$finder
=
$this
->
buildFinder
(
)
;
$this
->
assertSame
(
$finder
,
$finder
->
ignoreVCS
(
true
)
->
ignoreDotFiles
(
true
)
->
ignoreVCSIgnored
(
true
)
)
;
$this
->
iniSet
(
'open_basedir', \
dirname
(
__DIR__, 5
)
.\PATH_SEPARATOR.self::
toAbsolute
(
'gitignore/search_root'
)
)
;
$this
->
assertIterator
(
self::
toAbsolute
(
[
'gitignore/search_root/b.txt',
'gitignore/search_root/c.txt',
'gitignore/search_root/dir',
'gitignore/search_root/dir/a.txt',
'gitignore/search_root/dir/c.txt',
]
)
,
$finder
->
in
(
self::
toAbsolute
(
'gitignore/search_root'
)
)
->
getIterator
(
)
)
;
}
$finder
->
in
(
self::
$tmpDir
)
->
getIterator
(
)
)
;
}
public
function
testIgnoreVCSIgnored
(
)
{
$finder
=
$this
->
buildFinder
(
)
;
$this
->
assertSame
(
$finder
,
$finder
->
ignoreVCS
(
true
)
->
ignoreDotFiles
(
true
)
->
ignoreVCSIgnored
(
true
)
)
;
$this
->
assertIterator
(
self::
toAbsolute
(
[
'gitignore/search_root/b.txt',
'gitignore/search_root/dir',
'gitignore/search_root/dir/a.txt',
]
)
,
$finder
->
in
(
self::
toAbsolute
(
'gitignore/search_root'
)
)
->
getIterator
(
)
)
;
}
public
function
testIgnoreVCSIgnoredUpToFirstGitRepositoryRoot
(
)
{