phpat icon indicating copy to clipboard operation
phpat copied to clipboard

[0.10] canOnlyDependOn

Open darthf1 opened this issue 2 years ago • 0 comments

Hi!

Great job on 0.10!

Most of my tests included the canOnlyDependOn assertion, which I guess is removed in 0.10. Was this done on purpose and do you maybe have an alternative way of writing these rules? :)

Edit:

Ah. I guess I can nest it like this?

return PHPat::rule()
    ->classes(Selector::haveClassName('...'))
    ->shouldNotDependOn()
    ->classes(
        Selector::NOT(
            Selector::classname('...')
        )
    )

darthf1 avatar Sep 27 '22 11:09 darthf1