public function testSetIsLazy() { $def =
new Definition('stdClass'
);
$this->
assertFalse($def->
isLazy(), '->isLazy() returns false by default'
);
$this->
assertSame($def,
$def->
setLazy(true
), '->setLazy() implements a fluent interface'
);
$this->
assertTrue($def->
isLazy(), '->isLazy() returns true if the service is lazy.'
);
} public function testSetIsAbstract() { $def =
new Definition('stdClass'
);
$this->
assertFalse($def->
isAbstract(), '->isAbstract() returns false by default'
);
$this->
assertSame($def,
$def->
setAbstract(true
), '->setAbstract() implements a fluent interface'
);
$this->
assertTrue($def->
isAbstract(), '->isAbstract() returns true if the instance must not be public.'
);
} public function testSetIsDeprecated() { $def =
new Definition('stdClass'
);
$this->
assertFalse($def->
isDeprecated(), '->isDeprecated() returns false by default'
);
$this->
assertSame($def,
$def->
setDeprecated('vendor/package', '1.1', '%service_id%'
), '->setDeprecated() implements a fluent interface'
);
$this->
assertTrue($def->
isDeprecated(), '->isDeprecated() returns true if the instance should not be used anymore.'
);