3 * This file is part of the PHPUnit_MockObject package.
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 use SebastianBergmann\Exporter\Exporter;
14 * Stubs a method by returning a user-defined value.
16 * @since Class available since Release 1.0.0
18 class PHPUnit_Framework_MockObject_Stub_Return implements PHPUnit_Framework_MockObject_Stub
22 public function __construct($value)
24 $this->value = $value;
27 public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation)
32 public function toString()
34 $exporter = new Exporter;
37 'return user-specified value %s',
38 $exporter->export($this->value)