Advertisement
Guest User

Untitled

a guest
Aug 15th, 2019
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.87 KB | None | 0 0
  1. <?php
  2. /**
  3. * Mockery
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://github.com/padraic/mockery/blob/master/LICENSE
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to [email protected] so we can send you a copy immediately.
  14. *
  15. * @category Mockery
  16. * @package Mockery
  17. * @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com)
  18. * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
  19. */
  20.  
  21.  
  22.  
  23. use Mockery\HigherOrderMessage;
  24. use Mockery\MockInterface;
  25. use Mockery\LegacyMockInterface;
  26. use Mockery\ExpectsHigherOrderMessage;
  27. use Mockery\Exception\BadMethodCallException;
  28.  
  29. class Mockery_0_Illuminate_Database_Connection extends \Illuminate\Database\Connection implements MockInterface
  30. {
  31. /**
  32. * Stores an array of all expectation directors for this mock
  33. *
  34. * @var array
  35. */
  36. protected $_mockery_expectations = array();
  37.  
  38. /**
  39. * Stores an inital number of expectations that can be manipulated
  40. * while using the getter method.
  41. *
  42. * @var int
  43. */
  44. protected $_mockery_expectations_count = 0;
  45.  
  46. /**
  47. * Flag to indicate whether we can ignore method calls missing from our
  48. * expectations
  49. *
  50. * @var bool
  51. */
  52. protected $_mockery_ignoreMissing = false;
  53.  
  54. /**
  55. * Flag to indicate whether we can defer method calls missing from our
  56. * expectations
  57. *
  58. * @var bool
  59. */
  60. protected $_mockery_deferMissing = false;
  61.  
  62. /**
  63. * Flag to indicate whether this mock was verified
  64. *
  65. * @var bool
  66. */
  67. protected $_mockery_verified = false;
  68.  
  69. /**
  70. * Given name of the mock
  71. *
  72. * @var string
  73. */
  74. protected $_mockery_name = null;
  75.  
  76. /**
  77. * Order number of allocation
  78. *
  79. * @var int
  80. */
  81. protected $_mockery_allocatedOrder = 0;
  82.  
  83. /**
  84. * Current ordered number
  85. *
  86. * @var int
  87. */
  88. protected $_mockery_currentOrder = 0;
  89.  
  90. /**
  91. * Ordered groups
  92. *
  93. * @var array
  94. */
  95. protected $_mockery_groups = array();
  96.  
  97. /**
  98. * Mock container containing this mock object
  99. *
  100. * @var \Mockery\Container
  101. */
  102. protected $_mockery_container = null;
  103.  
  104. /**
  105. * Instance of a core object on which methods are called in the event
  106. * it has been set, and an expectation for one of the object's methods
  107. * does not exist. This implements a simple partial mock proxy system.
  108. *
  109. * @var object
  110. */
  111. protected $_mockery_partial = null;
  112.  
  113. /**
  114. * Flag to indicate we should ignore all expectations temporarily. Used
  115. * mainly to prevent expectation matching when in the middle of a mock
  116. * object recording session.
  117. *
  118. * @var bool
  119. */
  120. protected $_mockery_disableExpectationMatching = false;
  121.  
  122. /**
  123. * Stores all stubbed public methods separate from any on-object public
  124. * properties that may exist.
  125. *
  126. * @var array
  127. */
  128. protected $_mockery_mockableProperties = array();
  129.  
  130. /**
  131. * @var array
  132. */
  133. protected $_mockery_mockableMethods = array();
  134.  
  135. /**
  136. * Just a local cache for this mock's target's methods
  137. *
  138. * @var \ReflectionMethod[]
  139. */
  140. protected static $_mockery_methods;
  141.  
  142. protected $_mockery_allowMockingProtectedMethods = false;
  143.  
  144. protected $_mockery_receivedMethodCalls;
  145.  
  146. /**
  147. * If shouldIgnoreMissing is called, this value will be returned on all calls to missing methods
  148. * @var mixed
  149. */
  150. protected $_mockery_defaultReturnValue = null;
  151.  
  152. /**
  153. * Tracks internally all the bad method call exceptions that happened during runtime
  154. *
  155. * @var array
  156. */
  157. protected $_mockery_thrownExceptions = [];
  158.  
  159. /**
  160. * We want to avoid constructors since class is copied to Generator.php
  161. * for inclusion on extending class definitions.
  162. *
  163. * @param \Mockery\Container $container
  164. * @param object $partialObject
  165. * @return void
  166. */
  167. public function mockery_init(\Mockery\Container $container = null, $partialObject = null)
  168. {
  169. if (is_null($container)) {
  170. $container = new \Mockery\Container;
  171. }
  172. $this->_mockery_container = $container;
  173. if (!is_null($partialObject)) {
  174. $this->_mockery_partial = $partialObject;
  175. }
  176.  
  177. if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) {
  178. foreach ($this->mockery_getMethods() as $method) {
  179. if ($method->isPublic()) {
  180. $this->_mockery_mockableMethods[] = $method->getName();
  181. }
  182. }
  183. }
  184. }
  185.  
  186. /**
  187. * Set expected method calls
  188. *
  189. * @param mixed ...$methodNames one or many methods that are expected to be called in this mock
  190. *
  191. * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage
  192. */
  193. public function shouldReceive(...$methodNames)
  194. {
  195. if (count($methodNames) === 0) {
  196. return new HigherOrderMessage($this, "shouldReceive");
  197. }
  198.  
  199. foreach ($methodNames as $method) {
  200. if ("" == $method) {
  201. throw new \InvalidArgumentException("Received empty method name");
  202. }
  203. }
  204.  
  205. $self = $this;
  206. $allowMockingProtectedMethods = $this->_mockery_allowMockingProtectedMethods;
  207.  
  208. $lastExpectation = \Mockery::parseShouldReturnArgs(
  209. $this, $methodNames, function ($method) use ($self, $allowMockingProtectedMethods) {
  210. $rm = $self->mockery_getMethod($method);
  211. if ($rm) {
  212. if ($rm->isPrivate()) {
  213. throw new \InvalidArgumentException("$method() cannot be mocked as it is a private method");
  214. }
  215. if (!$allowMockingProtectedMethods && $rm->isProtected()) {
  216. throw new \InvalidArgumentException("$method() cannot be mocked as it is a protected method and mocking protected methods is not enabled for the currently used mock object. Use shouldAllowMockingProtectedMethods() to enable mocking of protected methods.");
  217. }
  218. }
  219.  
  220. $director = $self->mockery_getExpectationsFor($method);
  221. if (!$director) {
  222. $director = new \Mockery\ExpectationDirector($method, $self);
  223. $self->mockery_setExpectationsFor($method, $director);
  224. }
  225. $expectation = new \Mockery\Expectation($self, $method);
  226. $director->addExpectation($expectation);
  227. return $expectation;
  228. }
  229. );
  230. return $lastExpectation;
  231. }
  232.  
  233. // start method allows
  234. /**
  235. * @param mixed $something String method name or map of method => return
  236. * @return self|\Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage
  237. */
  238. public function allows($something = [])
  239. {
  240. if (is_string($something)) {
  241. return $this->shouldReceive($something);
  242. }
  243.  
  244. if (empty($something)) {
  245. return $this->shouldReceive();
  246. }
  247.  
  248. foreach ($something as $method => $returnValue) {
  249. $this->shouldReceive($method)->andReturn($returnValue);
  250. }
  251.  
  252. return $this;
  253. }
  254. // end method allows
  255.  
  256. // start method expects
  257. /**
  258. /**
  259. * @param mixed $something String method name (optional)
  260. * @return \Mockery\ExpectationInterface|\Mockery\Expectation|ExpectsHigherOrderMessage
  261. */
  262. public function expects($something = null)
  263. {
  264. if (is_string($something)) {
  265. return $this->shouldReceive($something)->once();
  266. }
  267.  
  268. return new ExpectsHigherOrderMessage($this);
  269. }
  270. // end method expects
  271.  
  272. /**
  273. * Shortcut method for setting an expectation that a method should not be called.
  274. *
  275. * @param array ...$methodNames one or many methods that are expected not to be called in this mock
  276. * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage
  277. */
  278. public function shouldNotReceive(...$methodNames)
  279. {
  280. if (count($methodNames) === 0) {
  281. return new HigherOrderMessage($this, "shouldNotReceive");
  282. }
  283.  
  284. $expectation = call_user_func_array(array($this, 'shouldReceive'), $methodNames);
  285. $expectation->never();
  286. return $expectation;
  287. }
  288.  
  289. /**
  290. * Allows additional methods to be mocked that do not explicitly exist on mocked class
  291. * @param String $method name of the method to be mocked
  292. * @return Mock
  293. */
  294. public function shouldAllowMockingMethod($method)
  295. {
  296. $this->_mockery_mockableMethods[] = $method;
  297. return $this;
  298. }
  299.  
  300. /**
  301. * Set mock to ignore unexpected methods and return Undefined class
  302. * @param mixed $returnValue the default return value for calls to missing functions on this mock
  303. * @return Mock
  304. */
  305. public function shouldIgnoreMissing($returnValue = null)
  306. {
  307. $this->_mockery_ignoreMissing = true;
  308. $this->_mockery_defaultReturnValue = $returnValue;
  309. return $this;
  310. }
  311.  
  312. public function asUndefined()
  313. {
  314. $this->_mockery_ignoreMissing = true;
  315. $this->_mockery_defaultReturnValue = new \Mockery\Undefined;
  316. return $this;
  317. }
  318.  
  319. /**
  320. * @return Mock
  321. */
  322. public function shouldAllowMockingProtectedMethods()
  323. {
  324. if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) {
  325. foreach ($this->mockery_getMethods() as $method) {
  326. if ($method->isProtected()) {
  327. $this->_mockery_mockableMethods[] = $method->getName();
  328. }
  329. }
  330. }
  331.  
  332. $this->_mockery_allowMockingProtectedMethods = true;
  333. return $this;
  334. }
  335.  
  336.  
  337. /**
  338. * Set mock to defer unexpected methods to it's parent
  339. *
  340. * This is particularly useless for this class, as it doesn't have a parent,
  341. * but included for completeness
  342. *
  343. * @deprecated 2.0.0 Please use makePartial() instead
  344. *
  345. * @return Mock
  346. */
  347. public function shouldDeferMissing()
  348. {
  349. return $this->makePartial();
  350. }
  351.  
  352. /**
  353. * Set mock to defer unexpected methods to it's parent
  354. *
  355. * It was an alias for shouldDeferMissing(), which will be removed
  356. * in 2.0.0.
  357. *
  358. * @return Mock
  359. */
  360. public function makePartial()
  361. {
  362. $this->_mockery_deferMissing = true;
  363. return $this;
  364. }
  365.  
  366. /**
  367. * In the event shouldReceive() accepting one or more methods/returns,
  368. * this method will switch them from normal expectations to default
  369. * expectations
  370. *
  371. * @return self
  372. */
  373. public function byDefault()
  374. {
  375. foreach ($this->_mockery_expectations as $director) {
  376. $exps = $director->getExpectations();
  377. foreach ($exps as $exp) {
  378. $exp->byDefault();
  379. }
  380. }
  381. return $this;
  382. }
  383.  
  384. /**
  385. * Capture calls to this mock
  386. */
  387. public function __call($method, array $args)
  388. {
  389. return $this->_mockery_handleMethodCall($method, $args);
  390. }
  391.  
  392. public static function __callStatic($method, array $args)
  393. {
  394. return self::_mockery_handleStaticMethodCall($method, $args);
  395. }
  396.  
  397. /**
  398. * Forward calls to this magic method to the __call method
  399. */
  400. public function __toString()
  401. {
  402. return $this->__call('__toString', array());
  403. }
  404.  
  405. /**
  406. * Iterate across all expectation directors and validate each
  407. *
  408. * @throws \Mockery\CountValidator\Exception
  409. * @return void
  410. */
  411. public function mockery_verify()
  412. {
  413. if ($this->_mockery_verified) {
  414. return;
  415. }
  416. if (isset($this->_mockery_ignoreVerification)
  417. && $this->_mockery_ignoreVerification == true) {
  418. return;
  419. }
  420. $this->_mockery_verified = true;
  421. foreach ($this->_mockery_expectations as $director) {
  422. $director->verify();
  423. }
  424. }
  425.  
  426. /**
  427. * Gets a list of exceptions thrown by this mock
  428. *
  429. * @return array
  430. */
  431. public function mockery_thrownExceptions()
  432. {
  433. return $this->_mockery_thrownExceptions;
  434. }
  435.  
  436. /**
  437. * Tear down tasks for this mock
  438. *
  439. * @return void
  440. */
  441. public function mockery_teardown()
  442. {
  443. }
  444.  
  445. /**
  446. * Fetch the next available allocation order number
  447. *
  448. * @return int
  449. */
  450. public function mockery_allocateOrder()
  451. {
  452. $this->_mockery_allocatedOrder += 1;
  453. return $this->_mockery_allocatedOrder;
  454. }
  455.  
  456. /**
  457. * Set ordering for a group
  458. *
  459. * @param mixed $group
  460. * @param int $order
  461. */
  462. public function mockery_setGroup($group, $order)
  463. {
  464. $this->_mockery_groups[$group] = $order;
  465. }
  466.  
  467. /**
  468. * Fetch array of ordered groups
  469. *
  470. * @return array
  471. */
  472. public function mockery_getGroups()
  473. {
  474. return $this->_mockery_groups;
  475. }
  476.  
  477. /**
  478. * Set current ordered number
  479. *
  480. * @param int $order
  481. */
  482. public function mockery_setCurrentOrder($order)
  483. {
  484. $this->_mockery_currentOrder = $order;
  485. return $this->_mockery_currentOrder;
  486. }
  487.  
  488. /**
  489. * Get current ordered number
  490. *
  491. * @return int
  492. */
  493. public function mockery_getCurrentOrder()
  494. {
  495. return $this->_mockery_currentOrder;
  496. }
  497.  
  498. /**
  499. * Validate the current mock's ordering
  500. *
  501. * @param string $method
  502. * @param int $order
  503. * @throws \Mockery\Exception
  504. * @return void
  505. */
  506. public function mockery_validateOrder($method, $order)
  507. {
  508. if ($order < $this->_mockery_currentOrder) {
  509. $exception = new \Mockery\Exception\InvalidOrderException(
  510. 'Method ' . __CLASS__ . '::' . $method . '()'
  511. . ' called out of order: expected order '
  512. . $order . ', was ' . $this->_mockery_currentOrder
  513. );
  514. $exception->setMock($this)
  515. ->setMethodName($method)
  516. ->setExpectedOrder($order)
  517. ->setActualOrder($this->_mockery_currentOrder);
  518. throw $exception;
  519. }
  520. $this->mockery_setCurrentOrder($order);
  521. }
  522.  
  523. /**
  524. * Gets the count of expectations for this mock
  525. *
  526. * @return int
  527. */
  528. public function mockery_getExpectationCount()
  529. {
  530. $count = $this->_mockery_expectations_count;
  531. foreach ($this->_mockery_expectations as $director) {
  532. $count += $director->getExpectationCount();
  533. }
  534. return $count;
  535. }
  536.  
  537. /**
  538. * Return the expectations director for the given method
  539. *
  540. * @var string $method
  541. * @return \Mockery\ExpectationDirector|null
  542. */
  543. public function mockery_setExpectationsFor($method, \Mockery\ExpectationDirector $director)
  544. {
  545. $this->_mockery_expectations[$method] = $director;
  546. }
  547.  
  548. /**
  549. * Return the expectations director for the given method
  550. *
  551. * @var string $method
  552. * @return \Mockery\ExpectationDirector|null
  553. */
  554. public function mockery_getExpectationsFor($method)
  555. {
  556. if (isset($this->_mockery_expectations[$method])) {
  557. return $this->_mockery_expectations[$method];
  558. }
  559. }
  560.  
  561. /**
  562. * Find an expectation matching the given method and arguments
  563. *
  564. * @var string $method
  565. * @var array $args
  566. * @return \Mockery\Expectation|null
  567. */
  568. public function mockery_findExpectation($method, array $args)
  569. {
  570. if (!isset($this->_mockery_expectations[$method])) {
  571. return null;
  572. }
  573. $director = $this->_mockery_expectations[$method];
  574.  
  575. return $director->findExpectation($args);
  576. }
  577.  
  578. /**
  579. * Return the container for this mock
  580. *
  581. * @return \Mockery\Container
  582. */
  583. public function mockery_getContainer()
  584. {
  585. return $this->_mockery_container;
  586. }
  587.  
  588. /**
  589. * Return the name for this mock
  590. *
  591. * @return string
  592. */
  593. public function mockery_getName()
  594. {
  595. return __CLASS__;
  596. }
  597.  
  598. /**
  599. * @return array
  600. */
  601. public function mockery_getMockableProperties()
  602. {
  603. return $this->_mockery_mockableProperties;
  604. }
  605.  
  606. public function __isset($name)
  607. {
  608. if (false === stripos($name, '_mockery_') && method_exists(get_parent_class($this), '__isset')) {
  609. return call_user_func('parent::__isset', $name);
  610. }
  611.  
  612. return false;
  613. }
  614.  
  615. public function mockery_getExpectations()
  616. {
  617. return $this->_mockery_expectations;
  618. }
  619.  
  620. /**
  621. * Calls a parent class method and returns the result. Used in a passthru
  622. * expectation where a real return value is required while still taking
  623. * advantage of expectation matching and call count verification.
  624. *
  625. * @param string $name
  626. * @param array $args
  627. * @return mixed
  628. */
  629. public function mockery_callSubjectMethod($name, array $args)
  630. {
  631. if (!method_exists($this, $name) && method_exists(get_parent_class($this), '__call')) {
  632. return call_user_func('parent::__call', $name, $args);
  633. }
  634. return call_user_func_array('parent::' . $name, $args);
  635. }
  636.  
  637. /**
  638. * @return string[]
  639. */
  640. public function mockery_getMockableMethods()
  641. {
  642. return $this->_mockery_mockableMethods;
  643. }
  644.  
  645. /**
  646. * @return bool
  647. */
  648. public function mockery_isAnonymous()
  649. {
  650. $rfc = new \ReflectionClass($this);
  651.  
  652. // HHVM has a Stringish interface
  653. $interfaces = array_filter($rfc->getInterfaces(), function ($i) {
  654. return $i->getName() !== "Stringish";
  655. });
  656. $onlyImplementsMock = 2 == count($interfaces);
  657.  
  658. return (false === $rfc->getParentClass()) && $onlyImplementsMock;
  659. }
  660.  
  661. public function __wakeup()
  662. {
  663. /**
  664. * This does not add __wakeup method support. It's a blind method and any
  665. * expected __wakeup work will NOT be performed. It merely cuts off
  666. * annoying errors where a __wakeup exists but is not essential when
  667. * mocking
  668. */
  669. }
  670.  
  671. public function __destruct()
  672. {
  673. /**
  674. * Overrides real class destructor in case if class was created without original constructor
  675. */
  676. }
  677.  
  678. public function mockery_getMethod($name)
  679. {
  680. foreach ($this->mockery_getMethods() as $method) {
  681. if ($method->getName() == $name) {
  682. return $method;
  683. }
  684. }
  685.  
  686. return null;
  687. }
  688.  
  689. /**
  690. * @param string $name Method name.
  691. *
  692. * @return mixed Generated return value based on the declared return value of the named method.
  693. */
  694. public function mockery_returnValueForMethod($name)
  695. {
  696. if (version_compare(PHP_VERSION, '7.0.0-dev') < 0) {
  697. return;
  698. }
  699.  
  700. $rm = $this->mockery_getMethod($name);
  701. if (!$rm || !$rm->hasReturnType()) {
  702. return;
  703. }
  704.  
  705. $returnType = $rm->getReturnType();
  706.  
  707. // Default return value for methods with nullable type is null
  708. if ($returnType->allowsNull()) {
  709. return null;
  710. }
  711.  
  712. $type = PHP_VERSION_ID >= 70100 ? $returnType->getName() : (string) $returnType;
  713. switch ($type) {
  714. case '': return;
  715. case 'string': return '';
  716. case 'int': return 0;
  717. case 'float': return 0.0;
  718. case 'bool': return false;
  719. case 'array': return [];
  720.  
  721. case 'callable':
  722. case 'Closure':
  723. return function () {
  724. };
  725.  
  726. case 'Traversable':
  727. case 'Generator':
  728. // Remove eval() when minimum version >=5.5
  729. $generator = eval('return function () { yield; };');
  730. return $generator();
  731.  
  732. case 'self':
  733. return \Mockery::mock($rm->getDeclaringClass()->getName());
  734.  
  735. case 'void':
  736. return null;
  737.  
  738. case 'object':
  739. if (version_compare(PHP_VERSION, '7.2.0-dev') >= 0) {
  740. return \Mockery::mock();
  741. }
  742.  
  743. default:
  744. return \Mockery::mock($type);
  745. }
  746. }
  747.  
  748. public function shouldHaveReceived($method = null, $args = null)
  749. {
  750. if ($method === null) {
  751. return new HigherOrderMessage($this, "shouldHaveReceived");
  752. }
  753.  
  754. $expectation = new \Mockery\VerificationExpectation($this, $method);
  755. if (null !== $args) {
  756. $expectation->withArgs($args);
  757. }
  758. $expectation->atLeast()->once();
  759. $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation);
  760. $this->_mockery_expectations_count++;
  761. $director->verify();
  762. return $director;
  763. }
  764.  
  765. public function shouldHaveBeenCalled()
  766. {
  767. return $this->shouldHaveReceived("__invoke");
  768. }
  769.  
  770. public function shouldNotHaveReceived($method = null, $args = null)
  771. {
  772. if ($method === null) {
  773. return new HigherOrderMessage($this, "shouldNotHaveReceived");
  774. }
  775.  
  776. $expectation = new \Mockery\VerificationExpectation($this, $method);
  777. if (null !== $args) {
  778. $expectation->withArgs($args);
  779. }
  780. $expectation->never();
  781. $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation);
  782. $this->_mockery_expectations_count++;
  783. $director->verify();
  784. return null;
  785. }
  786.  
  787. public function shouldNotHaveBeenCalled(array $args = null)
  788. {
  789. return $this->shouldNotHaveReceived("__invoke", $args);
  790. }
  791.  
  792. protected static function _mockery_handleStaticMethodCall($method, array $args)
  793. {
  794. $associatedRealObject = \Mockery::fetchMock(__CLASS__);
  795. try {
  796. return $associatedRealObject->__call($method, $args);
  797. } catch (BadMethodCallException $e) {
  798. throw new BadMethodCallException(
  799. 'Static method ' . $associatedRealObject->mockery_getName() . '::' . $method
  800. . '() does not exist on this mock object',
  801. null,
  802. $e
  803. );
  804. }
  805. }
  806.  
  807. protected function _mockery_getReceivedMethodCalls()
  808. {
  809. return $this->_mockery_receivedMethodCalls ?: $this->_mockery_receivedMethodCalls = new \Mockery\ReceivedMethodCalls();
  810. }
  811.  
  812. /**
  813. * Called when an instance Mock was created and its constructor is getting called
  814. *
  815. * @see \Mockery\Generator\StringManipulation\Pass\InstanceMockPass
  816. * @param array $args
  817. */
  818. protected function _mockery_constructorCalled(array $args)
  819. {
  820. if (!isset($this->_mockery_expectations['__construct']) /* _mockery_handleMethodCall runs the other checks */) {
  821. return;
  822. }
  823. $this->_mockery_handleMethodCall('__construct', $args);
  824. }
  825.  
  826. protected function _mockery_findExpectedMethodHandler($method)
  827. {
  828. if (isset($this->_mockery_expectations[$method])) {
  829. return $this->_mockery_expectations[$method];
  830. }
  831.  
  832. $lowerCasedMockeryExpectations = array_change_key_case($this->_mockery_expectations, CASE_LOWER);
  833. $lowerCasedMethod = strtolower($method);
  834.  
  835. if (isset($lowerCasedMockeryExpectations[$lowerCasedMethod])) {
  836. return $lowerCasedMockeryExpectations[$lowerCasedMethod];
  837. }
  838.  
  839. return null;
  840. }
  841.  
  842. protected function _mockery_handleMethodCall($method, array $args)
  843. {
  844. $this->_mockery_getReceivedMethodCalls()->push(new \Mockery\MethodCall($method, $args));
  845.  
  846. $rm = $this->mockery_getMethod($method);
  847. if ($rm && $rm->isProtected() && !$this->_mockery_allowMockingProtectedMethods) {
  848. if ($rm->isAbstract()) {
  849. return;
  850. }
  851.  
  852. try {
  853. $prototype = $rm->getPrototype();
  854. if ($prototype->isAbstract()) {
  855. return;
  856. }
  857. } catch (\ReflectionException $re) {
  858. // noop - there is no hasPrototype method
  859. }
  860.  
  861. return call_user_func_array("parent::$method", $args);
  862. }
  863.  
  864. $handler = $this->_mockery_findExpectedMethodHandler($method);
  865.  
  866. if ($handler !== null && !$this->_mockery_disableExpectationMatching) {
  867. try {
  868. return $handler->call($args);
  869. } catch (\Mockery\Exception\NoMatchingExpectationException $e) {
  870. if (!$this->_mockery_ignoreMissing && !$this->_mockery_deferMissing) {
  871. throw $e;
  872. }
  873. }
  874. }
  875.  
  876. if (!is_null($this->_mockery_partial) &&
  877. (method_exists($this->_mockery_partial, $method) || method_exists($this->_mockery_partial, '__call'))
  878. ) {
  879. return call_user_func_array(array($this->_mockery_partial, $method), $args);
  880. } elseif ($this->_mockery_deferMissing && is_callable("parent::$method")
  881. && (!$this->hasMethodOverloadingInParentClass() || method_exists(get_parent_class($this), $method))) {
  882. return call_user_func_array("parent::$method", $args);
  883. } elseif ($this->_mockery_deferMissing && method_exists(get_parent_class($this), '__call')) {
  884. return call_user_func('parent::__call', $method, $args);
  885. } elseif ($method == '__toString') {
  886. // __toString is special because we force its addition to the class API regardless of the
  887. // original implementation. Thus, we should always return a string rather than honor
  888. // _mockery_ignoreMissing and break the API with an error.
  889. return sprintf("%s#%s", __CLASS__, spl_object_hash($this));
  890. } elseif ($this->_mockery_ignoreMissing) {
  891. if (\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() || (method_exists($this->_mockery_partial, $method) || is_callable("parent::$method"))) {
  892. if ($this->_mockery_defaultReturnValue instanceof \Mockery\Undefined) {
  893. return call_user_func_array(array($this->_mockery_defaultReturnValue, $method), $args);
  894. } elseif (null === $this->_mockery_defaultReturnValue) {
  895. return $this->mockery_returnValueForMethod($method);
  896. }
  897.  
  898. return $this->_mockery_defaultReturnValue;
  899. }
  900. }
  901.  
  902. $message = 'Method ' . __CLASS__ . '::' . $method .
  903. '() does not exist on this mock object';
  904.  
  905. if (!is_null($rm)) {
  906. $message = 'Received ' . __CLASS__ .
  907. '::' . $method . '(), but no expectations were specified';
  908. }
  909.  
  910. $bmce = new BadMethodCallException($message);
  911. $this->_mockery_thrownExceptions[] = $bmce;
  912. throw $bmce;
  913. }
  914.  
  915. /**
  916. * Uses reflection to get the list of all
  917. * methods within the current mock object
  918. *
  919. * @return array
  920. */
  921. protected function mockery_getMethods()
  922. {
  923. if (static::$_mockery_methods && \Mockery::getConfiguration()->reflectionCacheEnabled()) {
  924. return static::$_mockery_methods;
  925. }
  926.  
  927. if (isset($this->_mockery_partial)) {
  928. $reflected = new \ReflectionObject($this->_mockery_partial);
  929. } else {
  930. $reflected = new \ReflectionClass($this);
  931. }
  932.  
  933. return static::$_mockery_methods = $reflected->getMethods();
  934. }
  935.  
  936. private function hasMethodOverloadingInParentClass()
  937. {
  938. // if there's __call any name would be callable
  939. return is_callable('parent::aFunctionNameThatNoOneWouldEverUseInRealLife12345');
  940. }
  941.  
  942. /**
  943. * @return array
  944. */
  945. private function getNonPublicMethods()
  946. {
  947. return array_map(
  948. function ($method) {
  949. return $method->getName();
  950. },
  951. array_filter($this->mockery_getMethods(), function ($method) {
  952. return !$method->isPublic();
  953. })
  954. );
  955. }
  956. public function __construct( $pdo, $database = '', $tablePrefix = '', array $config = null){
  957. $argc = func_num_args();
  958. $argv = func_get_args();
  959.  
  960. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  961. return $ret;
  962. }
  963.  
  964. public function useDefaultQueryGrammar(){
  965. $argc = func_num_args();
  966. $argv = func_get_args();
  967.  
  968. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  969. return $ret;
  970. }
  971.  
  972. protected function getDefaultQueryGrammar(){
  973. $argc = func_num_args();
  974. $argv = func_get_args();
  975.  
  976. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  977. return $ret;
  978. }
  979.  
  980. public function useDefaultSchemaGrammar(){
  981. $argc = func_num_args();
  982. $argv = func_get_args();
  983.  
  984. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  985. return $ret;
  986. }
  987.  
  988. protected function getDefaultSchemaGrammar(){
  989. $argc = func_num_args();
  990. $argv = func_get_args();
  991.  
  992. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  993. return $ret;
  994. }
  995.  
  996. public function useDefaultPostProcessor(){
  997. $argc = func_num_args();
  998. $argv = func_get_args();
  999.  
  1000. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1001. return $ret;
  1002. }
  1003.  
  1004. protected function getDefaultPostProcessor(){
  1005. $argc = func_num_args();
  1006. $argv = func_get_args();
  1007.  
  1008. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1009. return $ret;
  1010. }
  1011.  
  1012. public function getSchemaBuilder(){
  1013. $argc = func_num_args();
  1014. $argv = func_get_args();
  1015.  
  1016. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1017. return $ret;
  1018. }
  1019.  
  1020. public function table( $table){
  1021. $argc = func_num_args();
  1022. $argv = func_get_args();
  1023.  
  1024. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1025. return $ret;
  1026. }
  1027.  
  1028. public function query(){
  1029. $argc = func_num_args();
  1030. $argv = func_get_args();
  1031.  
  1032. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1033. return $ret;
  1034. }
  1035.  
  1036. public function selectOne( $query, $bindings = null, $useReadPdo = true){
  1037. $argc = func_num_args();
  1038. $argv = func_get_args();
  1039.  
  1040. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1041. return $ret;
  1042. }
  1043.  
  1044. public function selectFromWriteConnection( $query, $bindings = null){
  1045. $argc = func_num_args();
  1046. $argv = func_get_args();
  1047.  
  1048. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1049. return $ret;
  1050. }
  1051.  
  1052. public function select( $query, $bindings = null, $useReadPdo = true){
  1053. $argc = func_num_args();
  1054. $argv = func_get_args();
  1055.  
  1056. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1057. return $ret;
  1058. }
  1059.  
  1060. public function cursor( $query, $bindings = null, $useReadPdo = true){
  1061. $argc = func_num_args();
  1062. $argv = func_get_args();
  1063.  
  1064. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1065. return $ret;
  1066. }
  1067.  
  1068. protected function prepared(\PDOStatement $statement){
  1069. $argc = func_num_args();
  1070. $argv = func_get_args();
  1071.  
  1072. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1073. return $ret;
  1074. }
  1075.  
  1076. protected function getPdoForSelect( $useReadPdo = true){
  1077. $argc = func_num_args();
  1078. $argv = func_get_args();
  1079.  
  1080. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1081. return $ret;
  1082. }
  1083.  
  1084. public function insert( $query, $bindings = null){
  1085. $argc = func_num_args();
  1086. $argv = func_get_args();
  1087.  
  1088. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1089. return $ret;
  1090. }
  1091.  
  1092. public function update( $query, $bindings = null){
  1093. $argc = func_num_args();
  1094. $argv = func_get_args();
  1095.  
  1096. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1097. return $ret;
  1098. }
  1099.  
  1100. public function delete( $query, $bindings = null){
  1101. $argc = func_num_args();
  1102. $argv = func_get_args();
  1103.  
  1104. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1105. return $ret;
  1106. }
  1107.  
  1108. public function statement( $query, $bindings = null){
  1109. $argc = func_num_args();
  1110. $argv = func_get_args();
  1111.  
  1112. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1113. return $ret;
  1114. }
  1115.  
  1116. public function affectingStatement( $query, $bindings = null){
  1117. $argc = func_num_args();
  1118. $argv = func_get_args();
  1119.  
  1120. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1121. return $ret;
  1122. }
  1123.  
  1124. public function unprepared( $query){
  1125. $argc = func_num_args();
  1126. $argv = func_get_args();
  1127.  
  1128. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1129. return $ret;
  1130. }
  1131.  
  1132. public function pretend(\Closure $callback){
  1133. $argc = func_num_args();
  1134. $argv = func_get_args();
  1135.  
  1136. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1137. return $ret;
  1138. }
  1139.  
  1140. protected function withFreshQueryLog( $callback){
  1141. $argc = func_num_args();
  1142. $argv = func_get_args();
  1143.  
  1144. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1145. return $ret;
  1146. }
  1147.  
  1148. public function bindValues( $statement, $bindings){
  1149. $argc = func_num_args();
  1150. $argv = func_get_args();
  1151.  
  1152. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1153. return $ret;
  1154. }
  1155.  
  1156. public function prepareBindings(array $bindings){
  1157. $argc = func_num_args();
  1158. $argv = func_get_args();
  1159.  
  1160. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1161. return $ret;
  1162. }
  1163.  
  1164. protected function run( $query, $bindings, \Closure $callback){
  1165. $argc = func_num_args();
  1166. $argv = func_get_args();
  1167.  
  1168. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1169. return $ret;
  1170. }
  1171.  
  1172. protected function runQueryCallback( $query, $bindings, \Closure $callback){
  1173. $argc = func_num_args();
  1174. $argv = func_get_args();
  1175.  
  1176. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1177. return $ret;
  1178. }
  1179.  
  1180. public function logQuery( $query, $bindings, $time = NULL){
  1181. $argc = func_num_args();
  1182. $argv = func_get_args();
  1183.  
  1184. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1185. return $ret;
  1186. }
  1187.  
  1188. protected function getElapsedTime( $start){
  1189. $argc = func_num_args();
  1190. $argv = func_get_args();
  1191.  
  1192. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1193. return $ret;
  1194. }
  1195.  
  1196. protected function handleQueryException( $e, $query, $bindings, \Closure $callback){
  1197. $argc = func_num_args();
  1198. $argv = func_get_args();
  1199.  
  1200. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1201. return $ret;
  1202. }
  1203.  
  1204. protected function tryAgainIfCausedByLostConnection(\Illuminate\Database\QueryException $e, $query, $bindings, \Closure $callback){
  1205. $argc = func_num_args();
  1206. $argv = func_get_args();
  1207.  
  1208. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1209. return $ret;
  1210. }
  1211.  
  1212. public function reconnect(){
  1213. $argc = func_num_args();
  1214. $argv = func_get_args();
  1215.  
  1216. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1217. return $ret;
  1218. }
  1219.  
  1220. protected function reconnectIfMissingConnection(){
  1221. $argc = func_num_args();
  1222. $argv = func_get_args();
  1223.  
  1224. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1225. return $ret;
  1226. }
  1227.  
  1228. public function disconnect(){
  1229. $argc = func_num_args();
  1230. $argv = func_get_args();
  1231.  
  1232. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1233. return $ret;
  1234. }
  1235.  
  1236. public function listen(\Closure $callback){
  1237. $argc = func_num_args();
  1238. $argv = func_get_args();
  1239.  
  1240. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1241. return $ret;
  1242. }
  1243.  
  1244. protected function fireConnectionEvent( $event){
  1245. $argc = func_num_args();
  1246. $argv = func_get_args();
  1247.  
  1248. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1249. return $ret;
  1250. }
  1251.  
  1252. protected function event( $event){
  1253. $argc = func_num_args();
  1254. $argv = func_get_args();
  1255.  
  1256. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1257. return $ret;
  1258. }
  1259.  
  1260. public function raw( $value){
  1261. $argc = func_num_args();
  1262. $argv = func_get_args();
  1263.  
  1264. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1265. return $ret;
  1266. }
  1267.  
  1268. public function recordsHaveBeenModified( $value = true){
  1269. $argc = func_num_args();
  1270. $argv = func_get_args();
  1271.  
  1272. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1273. return $ret;
  1274. }
  1275.  
  1276. public function isDoctrineAvailable(){
  1277. $argc = func_num_args();
  1278. $argv = func_get_args();
  1279.  
  1280. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1281. return $ret;
  1282. }
  1283.  
  1284. public function getDoctrineColumn( $table, $column){
  1285. $argc = func_num_args();
  1286. $argv = func_get_args();
  1287.  
  1288. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1289. return $ret;
  1290. }
  1291.  
  1292. public function getDoctrineSchemaManager(){
  1293. $argc = func_num_args();
  1294. $argv = func_get_args();
  1295.  
  1296. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1297. return $ret;
  1298. }
  1299.  
  1300. public function getDoctrineConnection(){
  1301. $argc = func_num_args();
  1302. $argv = func_get_args();
  1303.  
  1304. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1305. return $ret;
  1306. }
  1307.  
  1308. public function getPdo(){
  1309. $argc = func_num_args();
  1310. $argv = func_get_args();
  1311.  
  1312. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1313. return $ret;
  1314. }
  1315.  
  1316. public function getReadPdo(){
  1317. $argc = func_num_args();
  1318. $argv = func_get_args();
  1319.  
  1320. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1321. return $ret;
  1322. }
  1323.  
  1324. public function setPdo( $pdo){
  1325. $argc = func_num_args();
  1326. $argv = func_get_args();
  1327.  
  1328. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1329. return $ret;
  1330. }
  1331.  
  1332. public function setReadPdo( $pdo){
  1333. $argc = func_num_args();
  1334. $argv = func_get_args();
  1335.  
  1336. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1337. return $ret;
  1338. }
  1339.  
  1340. public function setReconnector( $reconnector){
  1341. $argc = func_num_args();
  1342. $argv = func_get_args();
  1343.  
  1344. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1345. return $ret;
  1346. }
  1347.  
  1348. public function getName(){
  1349. $argc = func_num_args();
  1350. $argv = func_get_args();
  1351.  
  1352. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1353. return $ret;
  1354. }
  1355.  
  1356. public function getConfig( $option = NULL){
  1357. $argc = func_num_args();
  1358. $argv = func_get_args();
  1359.  
  1360. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1361. return $ret;
  1362. }
  1363.  
  1364. public function getDriverName(){
  1365. $argc = func_num_args();
  1366. $argv = func_get_args();
  1367.  
  1368. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1369. return $ret;
  1370. }
  1371.  
  1372. public function getQueryGrammar(){
  1373. $argc = func_num_args();
  1374. $argv = func_get_args();
  1375.  
  1376. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1377. return $ret;
  1378. }
  1379.  
  1380. public function setQueryGrammar(\Illuminate\Database\Query\Grammars\Grammar $grammar){
  1381. $argc = func_num_args();
  1382. $argv = func_get_args();
  1383.  
  1384. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1385. return $ret;
  1386. }
  1387.  
  1388. public function getSchemaGrammar(){
  1389. $argc = func_num_args();
  1390. $argv = func_get_args();
  1391.  
  1392. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1393. return $ret;
  1394. }
  1395.  
  1396. public function setSchemaGrammar(\Illuminate\Database\Schema\Grammars\Grammar $grammar){
  1397. $argc = func_num_args();
  1398. $argv = func_get_args();
  1399.  
  1400. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1401. return $ret;
  1402. }
  1403.  
  1404. public function getPostProcessor(){
  1405. $argc = func_num_args();
  1406. $argv = func_get_args();
  1407.  
  1408. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1409. return $ret;
  1410. }
  1411.  
  1412. public function setPostProcessor(\Illuminate\Database\Query\Processors\Processor $processor){
  1413. $argc = func_num_args();
  1414. $argv = func_get_args();
  1415.  
  1416. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1417. return $ret;
  1418. }
  1419.  
  1420. public function getEventDispatcher(){
  1421. $argc = func_num_args();
  1422. $argv = func_get_args();
  1423.  
  1424. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1425. return $ret;
  1426. }
  1427.  
  1428. public function setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $events){
  1429. $argc = func_num_args();
  1430. $argv = func_get_args();
  1431.  
  1432. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1433. return $ret;
  1434. }
  1435.  
  1436. public function unsetEventDispatcher(){
  1437. $argc = func_num_args();
  1438. $argv = func_get_args();
  1439.  
  1440. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1441. return $ret;
  1442. }
  1443.  
  1444. public function pretending(){
  1445. $argc = func_num_args();
  1446. $argv = func_get_args();
  1447.  
  1448. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1449. return $ret;
  1450. }
  1451.  
  1452. public function getQueryLog(){
  1453. $argc = func_num_args();
  1454. $argv = func_get_args();
  1455.  
  1456. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1457. return $ret;
  1458. }
  1459.  
  1460. public function flushQueryLog(){
  1461. $argc = func_num_args();
  1462. $argv = func_get_args();
  1463.  
  1464. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1465. return $ret;
  1466. }
  1467.  
  1468. public function enableQueryLog(){
  1469. $argc = func_num_args();
  1470. $argv = func_get_args();
  1471.  
  1472. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1473. return $ret;
  1474. }
  1475.  
  1476. public function disableQueryLog(){
  1477. $argc = func_num_args();
  1478. $argv = func_get_args();
  1479.  
  1480. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1481. return $ret;
  1482. }
  1483.  
  1484. public function logging(){
  1485. $argc = func_num_args();
  1486. $argv = func_get_args();
  1487.  
  1488. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1489. return $ret;
  1490. }
  1491.  
  1492. public function getDatabaseName(){
  1493. $argc = func_num_args();
  1494. $argv = func_get_args();
  1495.  
  1496. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1497. return $ret;
  1498. }
  1499.  
  1500. public function setDatabaseName( $database){
  1501. $argc = func_num_args();
  1502. $argv = func_get_args();
  1503.  
  1504. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1505. return $ret;
  1506. }
  1507.  
  1508. public function getTablePrefix(){
  1509. $argc = func_num_args();
  1510. $argv = func_get_args();
  1511.  
  1512. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1513. return $ret;
  1514. }
  1515.  
  1516. public function setTablePrefix( $prefix){
  1517. $argc = func_num_args();
  1518. $argv = func_get_args();
  1519.  
  1520. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1521. return $ret;
  1522. }
  1523.  
  1524. public function withTablePrefix(\Illuminate\Database\Grammar $grammar){
  1525. $argc = func_num_args();
  1526. $argv = func_get_args();
  1527.  
  1528. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1529. return $ret;
  1530. }
  1531.  
  1532. public static function resolverFor( $driver, \Closure $callback): void{
  1533. $argc = func_num_args();
  1534. $argv = func_get_args();
  1535.  
  1536. $ret = static::_mockery_handleStaticMethodCall(__FUNCTION__, $argv);
  1537. }
  1538.  
  1539. public static function getResolver( $driver){
  1540. $argc = func_num_args();
  1541. $argv = func_get_args();
  1542.  
  1543. $ret = static::_mockery_handleStaticMethodCall(__FUNCTION__, $argv);
  1544. return $ret;
  1545. }
  1546.  
  1547. protected function causedByDeadlock(?\Exception $e): bool{
  1548. $argc = func_num_args();
  1549. $argv = func_get_args();
  1550.  
  1551. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1552. return $ret;
  1553. }
  1554.  
  1555. protected function causedByLostConnection(?\Throwable $e): bool{
  1556. $argc = func_num_args();
  1557. $argv = func_get_args();
  1558.  
  1559. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1560. return $ret;
  1561. }
  1562.  
  1563. public function transaction(?\Closure $callback, $attempts = 1){
  1564. $argc = func_num_args();
  1565. $argv = func_get_args();
  1566.  
  1567. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1568. return $ret;
  1569. }
  1570.  
  1571. protected function handleTransactionException( $e, $currentAttempt, $maxAttempts): void{
  1572. $argc = func_num_args();
  1573. $argv = func_get_args();
  1574.  
  1575. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1576. }
  1577.  
  1578. public function beginTransaction(): void{
  1579. $argc = func_num_args();
  1580. $argv = func_get_args();
  1581.  
  1582. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1583. }
  1584.  
  1585. protected function createTransaction(): void{
  1586. $argc = func_num_args();
  1587. $argv = func_get_args();
  1588.  
  1589. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1590. }
  1591.  
  1592. protected function createSavepoint(): void{
  1593. $argc = func_num_args();
  1594. $argv = func_get_args();
  1595.  
  1596. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1597. }
  1598.  
  1599. protected function handleBeginTransactionException( $e): void{
  1600. $argc = func_num_args();
  1601. $argv = func_get_args();
  1602.  
  1603. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1604. }
  1605.  
  1606. public function commit(): void{
  1607. $argc = func_num_args();
  1608. $argv = func_get_args();
  1609.  
  1610. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1611. }
  1612.  
  1613. public function rollBack( $toLevel = NULL): void{
  1614. $argc = func_num_args();
  1615. $argv = func_get_args();
  1616.  
  1617. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1618. }
  1619.  
  1620. protected function performRollBack( $toLevel): void{
  1621. $argc = func_num_args();
  1622. $argv = func_get_args();
  1623.  
  1624. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1625. }
  1626.  
  1627. protected function handleRollBackException( $e): void{
  1628. $argc = func_num_args();
  1629. $argv = func_get_args();
  1630.  
  1631. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1632. }
  1633.  
  1634. public function transactionLevel(){
  1635. $argc = func_num_args();
  1636. $argv = func_get_args();
  1637.  
  1638. $ret = $this->_mockery_handleMethodCall(__FUNCTION__, $argv);
  1639. return $ret;
  1640. }
  1641.  
  1642. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement