public function testSetGetFile() { $def =
new Definition('stdClass'
);
$this->
assertSame($def,
$def->
setFile('foo'
), '->setFile() implements a fluent interface'
);
$this->
assertEquals('foo',
$def->
getFile(), '->getFile() returns the file to include'
);
} public function testSetIsShared() { $def =
new Definition('stdClass'
);
$this->
assertTrue($def->
isShared(), '->isShared() returns true by default'
);
$this->
assertSame($def,
$def->
setShared(false
), '->setShared() implements a fluent interface'
);
$this->
assertFalse($def->
isShared(), '->isShared() returns false if the instance must not be shared'
);
} public function testSetIsPublic() { $def =
new Definition('stdClass'
);
$this->
assertFalse($def->
isPublic(), '->isPublic() returns false by default'
);
$this->
assertSame($def,
$def->
setPublic(true
), '->setPublic() implements a fluent interface'
);
$this->
assertTrue($def->
isPublic(), '->isPublic() returns true if the service is public.'
);
}