phpResource:: isOfType() will compare the type of the given resource against a string (->isOfType('stream'))
phpResource:: is*() will match the type of the stream against a pattern computed from the method name: ->isFooBar() will try to match a stream with type foo bar, fooBar, foo_bar, ...
phpResource::$type is an helper providing a string asserter on the stream type so that the user can do things like ->type->matches('/foo.*bar/')
See atoum/atoum#535
Both assertions are equivalent here. To sum-up:
phpResource
asserter is aliased toresource
phpResource:: isOfType()
will compare the type of the given resource against a string (->isOfType('stream')
)phpResource:: is*()
will match the type of the stream against a pattern computed from the method name:->isFooBar()
will try to match a stream with typefoo bar
,fooBar
,foo_bar
, ...phpResource::$type
is an helper providing a string asserter on the stream type so that the user can do things like->type->matches('/foo.*bar/')