芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/vendor/codeception/stub/src/Stub/Expected.php
make('User', [ * 'getName' => Expected::never(), * 'someMethod' => function() {} * ]); * $user->someMethod(); * ?> * ``` * * @param mixed $params * @return StubMarshaler */ public static function never($params = null) { return new StubMarshaler( new InvokedCount(0), self::closureIfNull($params) ); } /** * Checks if a method has been invoked exactly one * time. * * If the number is less or greater it will later be checked in verify() and also throw an * exception. * * ```php * make( * 'User', * array( * 'getName' => Expected::once('Davert'), * 'someMethod' => function() {} * ) * ); * $userName = $user->getName(); * $this->assertEquals('Davert', $userName); * ?> * ``` * Alternatively, a function can be passed as parameter: * * ```php * make( * 'User', * array( * 'getName' => Expected::atLeastOnce('Davert')), * 'someMethod' => function() {} * ) * ); * $user->getName(); * $userName = $user->getName(); * $this->assertEquals('Davert', $userName); * ?> * ``` * * Alternatively, a function can be passed as parameter: * * ```php * make( * 'User', * array( * 'getName' => Expected::exactly(3, 'Davert'), * 'someMethod' => function() {} * ) * ); * $user->getName(); * $user->getName(); * $userName = $user->getName(); * $this->assertEquals('Davert', $userName); * ?> * ``` * Alternatively, a function can be passed as parameter: * * ```php *