annotate vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php @ 7:848c88cfe644

More layout
author Chris Cannam
date Fri, 05 Jan 2018 13:59:44 +0000
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2 /*
Chris@0 3 * This file is part of the PHPUnit_MockObject package.
Chris@0 4 *
Chris@0 5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
Chris@0 6 *
Chris@0 7 * For the full copyright and license information, please view the LICENSE
Chris@0 8 * file that was distributed with this source code.
Chris@0 9 */
Chris@0 10
Chris@0 11 /**
Chris@0 12 * Invocation matcher which does not care about previous state from earlier
Chris@0 13 * invocations.
Chris@0 14 *
Chris@0 15 * This abstract class can be implemented by matchers which does not care about
Chris@0 16 * state but only the current run-time value of the invocation itself.
Chris@0 17 *
Chris@0 18 * @since Class available since Release 1.0.0
Chris@0 19 * @abstract
Chris@0 20 */
Chris@0 21 abstract class PHPUnit_Framework_MockObject_Matcher_StatelessInvocation implements PHPUnit_Framework_MockObject_Matcher_Invocation
Chris@0 22 {
Chris@0 23 /**
Chris@0 24 * Registers the invocation $invocation in the object as being invoked.
Chris@0 25 * This will only occur after matches() returns true which means the
Chris@0 26 * current invocation is the correct one.
Chris@0 27 *
Chris@0 28 * The matcher can store information from the invocation which can later
Chris@0 29 * be checked in verify(), or it can check the values directly and throw
Chris@0 30 * and exception if an expectation is not met.
Chris@0 31 *
Chris@0 32 * If the matcher is a stub it will also have a return value.
Chris@0 33 *
Chris@0 34 * @param PHPUnit_Framework_MockObject_Invocation $invocation
Chris@0 35 * Object containing information on a mocked or stubbed method which
Chris@0 36 * was invoked.
Chris@0 37 * @return mixed
Chris@0 38 */
Chris@0 39 public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
Chris@0 40 {
Chris@0 41 }
Chris@0 42
Chris@0 43 /**
Chris@0 44 * Checks if the invocation $invocation matches the current rules. If it does
Chris@0 45 * the matcher will get the invoked() method called which should check if an
Chris@0 46 * expectation is met.
Chris@0 47 *
Chris@0 48 * @param PHPUnit_Framework_MockObject_Invocation $invocation
Chris@0 49 * Object containing information on a mocked or stubbed method which
Chris@0 50 * was invoked.
Chris@0 51 * @return bool
Chris@0 52 */
Chris@0 53 public function verify()
Chris@0 54 {
Chris@0 55 }
Chris@0 56 }