/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php

https://gitlab.com/mdabutaleb/bitm-laravel-1 · PHP · 2048 lines · 830 code · 119 blank · 1099 comment · 0 complexity · 3fdd6916249545a22b76dad091c9855a MD5 · raw file

  1. <?php
  2. /*
  3. * This file is part of PHPUnit.
  4. *
  5. * (c) Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * Returns a matcher that matches when the method is executed
  12. * zero or more times.
  13. *
  14. * @return PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount
  15. *
  16. * @since Method available since Release 3.0.0
  17. */
  18. function any()
  19. {
  20. return call_user_func_array(
  21. 'PHPUnit_Framework_TestCase::any',
  22. func_get_args()
  23. );
  24. }
  25. /**
  26. * Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
  27. *
  28. * @return PHPUnit_Framework_Constraint_IsAnything
  29. *
  30. * @since Method available since Release 3.0.0
  31. */
  32. function anything()
  33. {
  34. return call_user_func_array(
  35. 'PHPUnit_Framework_Assert::anything',
  36. func_get_args()
  37. );
  38. }
  39. /**
  40. * Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
  41. *
  42. * @param mixed $key
  43. *
  44. * @return PHPUnit_Framework_Constraint_ArrayHasKey
  45. *
  46. * @since Method available since Release 3.0.0
  47. */
  48. function arrayHasKey($key)
  49. {
  50. return call_user_func_array(
  51. 'PHPUnit_Framework_Assert::arrayHasKey',
  52. func_get_args()
  53. );
  54. }
  55. /**
  56. * Asserts that an array has a specified key.
  57. *
  58. * @param mixed $key
  59. * @param array|ArrayAccess $array
  60. * @param string $message
  61. *
  62. * @since Method available since Release 3.0.0
  63. */
  64. function assertArrayHasKey($key, $array, $message = '')
  65. {
  66. return call_user_func_array(
  67. 'PHPUnit_Framework_Assert::assertArrayHasKey',
  68. func_get_args()
  69. );
  70. }
  71. /**
  72. * Asserts that an array has a specified subset.
  73. *
  74. * @param array|ArrayAccess $subset
  75. * @param array|ArrayAccess $array
  76. * @param bool $strict Check for object identity
  77. * @param string $message
  78. *
  79. * @since Method available since Release 4.4.0
  80. */
  81. function assertArraySubset($subset, $array, $strict = false, $message = '')
  82. {
  83. return call_user_func_array(
  84. 'PHPUnit_Framework_Assert::assertArraySubset',
  85. func_get_args()
  86. );
  87. }
  88. /**
  89. * Asserts that an array does not have a specified key.
  90. *
  91. * @param mixed $key
  92. * @param array|ArrayAccess $array
  93. * @param string $message
  94. *
  95. * @since Method available since Release 3.0.0
  96. */
  97. function assertArrayNotHasKey($key, $array, $message = '')
  98. {
  99. return call_user_func_array(
  100. 'PHPUnit_Framework_Assert::assertArrayNotHasKey',
  101. func_get_args()
  102. );
  103. }
  104. /**
  105. * Asserts that a haystack that is stored in a static attribute of a class
  106. * or an attribute of an object contains a needle.
  107. *
  108. * @param mixed $needle
  109. * @param string $haystackAttributeName
  110. * @param mixed $haystackClassOrObject
  111. * @param string $message
  112. * @param bool $ignoreCase
  113. * @param bool $checkForObjectIdentity
  114. * @param bool $checkForNonObjectIdentity
  115. *
  116. * @since Method available since Release 3.0.0
  117. */
  118. function assertAttributeContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
  119. {
  120. return call_user_func_array(
  121. 'PHPUnit_Framework_Assert::assertAttributeContains',
  122. func_get_args()
  123. );
  124. }
  125. /**
  126. * Asserts that a haystack that is stored in a static attribute of a class
  127. * or an attribute of an object contains only values of a given type.
  128. *
  129. * @param string $type
  130. * @param string $haystackAttributeName
  131. * @param mixed $haystackClassOrObject
  132. * @param bool $isNativeType
  133. * @param string $message
  134. *
  135. * @since Method available since Release 3.1.4
  136. */
  137. function assertAttributeContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
  138. {
  139. return call_user_func_array(
  140. 'PHPUnit_Framework_Assert::assertAttributeContainsOnly',
  141. func_get_args()
  142. );
  143. }
  144. /**
  145. * Asserts the number of elements of an array, Countable or Traversable
  146. * that is stored in an attribute.
  147. *
  148. * @param int $expectedCount
  149. * @param string $haystackAttributeName
  150. * @param mixed $haystackClassOrObject
  151. * @param string $message
  152. *
  153. * @since Method available since Release 3.6.0
  154. */
  155. function assertAttributeCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
  156. {
  157. return call_user_func_array(
  158. 'PHPUnit_Framework_Assert::assertAttributeCount',
  159. func_get_args()
  160. );
  161. }
  162. /**
  163. * Asserts that a static attribute of a class or an attribute of an object
  164. * is empty.
  165. *
  166. * @param string $haystackAttributeName
  167. * @param mixed $haystackClassOrObject
  168. * @param string $message
  169. *
  170. * @since Method available since Release 3.5.0
  171. */
  172. function assertAttributeEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
  173. {
  174. return call_user_func_array(
  175. 'PHPUnit_Framework_Assert::assertAttributeEmpty',
  176. func_get_args()
  177. );
  178. }
  179. /**
  180. * Asserts that a variable is equal to an attribute of an object.
  181. *
  182. * @param mixed $expected
  183. * @param string $actualAttributeName
  184. * @param string $actualClassOrObject
  185. * @param string $message
  186. * @param float $delta
  187. * @param int $maxDepth
  188. * @param bool $canonicalize
  189. * @param bool $ignoreCase
  190. */
  191. function assertAttributeEquals($expected, $actualAttributeName, $actualClassOrObject, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
  192. {
  193. return call_user_func_array(
  194. 'PHPUnit_Framework_Assert::assertAttributeEquals',
  195. func_get_args()
  196. );
  197. }
  198. /**
  199. * Asserts that an attribute is greater than another value.
  200. *
  201. * @param mixed $expected
  202. * @param string $actualAttributeName
  203. * @param string $actualClassOrObject
  204. * @param string $message
  205. *
  206. * @since Method available since Release 3.1.0
  207. */
  208. function assertAttributeGreaterThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
  209. {
  210. return call_user_func_array(
  211. 'PHPUnit_Framework_Assert::assertAttributeGreaterThan',
  212. func_get_args()
  213. );
  214. }
  215. /**
  216. * Asserts that an attribute is greater than or equal to another value.
  217. *
  218. * @param mixed $expected
  219. * @param string $actualAttributeName
  220. * @param string $actualClassOrObject
  221. * @param string $message
  222. *
  223. * @since Method available since Release 3.1.0
  224. */
  225. function assertAttributeGreaterThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
  226. {
  227. return call_user_func_array(
  228. 'PHPUnit_Framework_Assert::assertAttributeGreaterThanOrEqual',
  229. func_get_args()
  230. );
  231. }
  232. /**
  233. * Asserts that an attribute is of a given type.
  234. *
  235. * @param string $expected
  236. * @param string $attributeName
  237. * @param mixed $classOrObject
  238. * @param string $message
  239. *
  240. * @since Method available since Release 3.5.0
  241. */
  242. function assertAttributeInstanceOf($expected, $attributeName, $classOrObject, $message = '')
  243. {
  244. return call_user_func_array(
  245. 'PHPUnit_Framework_Assert::assertAttributeInstanceOf',
  246. func_get_args()
  247. );
  248. }
  249. /**
  250. * Asserts that an attribute is of a given type.
  251. *
  252. * @param string $expected
  253. * @param string $attributeName
  254. * @param mixed $classOrObject
  255. * @param string $message
  256. *
  257. * @since Method available since Release 3.5.0
  258. */
  259. function assertAttributeInternalType($expected, $attributeName, $classOrObject, $message = '')
  260. {
  261. return call_user_func_array(
  262. 'PHPUnit_Framework_Assert::assertAttributeInternalType',
  263. func_get_args()
  264. );
  265. }
  266. /**
  267. * Asserts that an attribute is smaller than another value.
  268. *
  269. * @param mixed $expected
  270. * @param string $actualAttributeName
  271. * @param string $actualClassOrObject
  272. * @param string $message
  273. *
  274. * @since Method available since Release 3.1.0
  275. */
  276. function assertAttributeLessThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
  277. {
  278. return call_user_func_array(
  279. 'PHPUnit_Framework_Assert::assertAttributeLessThan',
  280. func_get_args()
  281. );
  282. }
  283. /**
  284. * Asserts that an attribute is smaller than or equal to another value.
  285. *
  286. * @param mixed $expected
  287. * @param string $actualAttributeName
  288. * @param string $actualClassOrObject
  289. * @param string $message
  290. *
  291. * @since Method available since Release 3.1.0
  292. */
  293. function assertAttributeLessThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
  294. {
  295. return call_user_func_array(
  296. 'PHPUnit_Framework_Assert::assertAttributeLessThanOrEqual',
  297. func_get_args()
  298. );
  299. }
  300. /**
  301. * Asserts that a haystack that is stored in a static attribute of a class
  302. * or an attribute of an object does not contain a needle.
  303. *
  304. * @param mixed $needle
  305. * @param string $haystackAttributeName
  306. * @param mixed $haystackClassOrObject
  307. * @param string $message
  308. * @param bool $ignoreCase
  309. * @param bool $checkForObjectIdentity
  310. * @param bool $checkForNonObjectIdentity
  311. *
  312. * @since Method available since Release 3.0.0
  313. */
  314. function assertAttributeNotContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
  315. {
  316. return call_user_func_array(
  317. 'PHPUnit_Framework_Assert::assertAttributeNotContains',
  318. func_get_args()
  319. );
  320. }
  321. /**
  322. * Asserts that a haystack that is stored in a static attribute of a class
  323. * or an attribute of an object does not contain only values of a given
  324. * type.
  325. *
  326. * @param string $type
  327. * @param string $haystackAttributeName
  328. * @param mixed $haystackClassOrObject
  329. * @param bool $isNativeType
  330. * @param string $message
  331. *
  332. * @since Method available since Release 3.1.4
  333. */
  334. function assertAttributeNotContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
  335. {
  336. return call_user_func_array(
  337. 'PHPUnit_Framework_Assert::assertAttributeNotContainsOnly',
  338. func_get_args()
  339. );
  340. }
  341. /**
  342. * Asserts the number of elements of an array, Countable or Traversable
  343. * that is stored in an attribute.
  344. *
  345. * @param int $expectedCount
  346. * @param string $haystackAttributeName
  347. * @param mixed $haystackClassOrObject
  348. * @param string $message
  349. *
  350. * @since Method available since Release 3.6.0
  351. */
  352. function assertAttributeNotCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
  353. {
  354. return call_user_func_array(
  355. 'PHPUnit_Framework_Assert::assertAttributeNotCount',
  356. func_get_args()
  357. );
  358. }
  359. /**
  360. * Asserts that a static attribute of a class or an attribute of an object
  361. * is not empty.
  362. *
  363. * @param string $haystackAttributeName
  364. * @param mixed $haystackClassOrObject
  365. * @param string $message
  366. *
  367. * @since Method available since Release 3.5.0
  368. */
  369. function assertAttributeNotEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
  370. {
  371. return call_user_func_array(
  372. 'PHPUnit_Framework_Assert::assertAttributeNotEmpty',
  373. func_get_args()
  374. );
  375. }
  376. /**
  377. * Asserts that a variable is not equal to an attribute of an object.
  378. *
  379. * @param mixed $expected
  380. * @param string $actualAttributeName
  381. * @param string $actualClassOrObject
  382. * @param string $message
  383. * @param float $delta
  384. * @param int $maxDepth
  385. * @param bool $canonicalize
  386. * @param bool $ignoreCase
  387. */
  388. function assertAttributeNotEquals($expected, $actualAttributeName, $actualClassOrObject, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
  389. {
  390. return call_user_func_array(
  391. 'PHPUnit_Framework_Assert::assertAttributeNotEquals',
  392. func_get_args()
  393. );
  394. }
  395. /**
  396. * Asserts that an attribute is of a given type.
  397. *
  398. * @param string $expected
  399. * @param string $attributeName
  400. * @param mixed $classOrObject
  401. * @param string $message
  402. *
  403. * @since Method available since Release 3.5.0
  404. */
  405. function assertAttributeNotInstanceOf($expected, $attributeName, $classOrObject, $message = '')
  406. {
  407. return call_user_func_array(
  408. 'PHPUnit_Framework_Assert::assertAttributeNotInstanceOf',
  409. func_get_args()
  410. );
  411. }
  412. /**
  413. * Asserts that an attribute is of a given type.
  414. *
  415. * @param string $expected
  416. * @param string $attributeName
  417. * @param mixed $classOrObject
  418. * @param string $message
  419. *
  420. * @since Method available since Release 3.5.0
  421. */
  422. function assertAttributeNotInternalType($expected, $attributeName, $classOrObject, $message = '')
  423. {
  424. return call_user_func_array(
  425. 'PHPUnit_Framework_Assert::assertAttributeNotInternalType',
  426. func_get_args()
  427. );
  428. }
  429. /**
  430. * Asserts that a variable and an attribute of an object do not have the
  431. * same type and value.
  432. *
  433. * @param mixed $expected
  434. * @param string $actualAttributeName
  435. * @param object $actualClassOrObject
  436. * @param string $message
  437. */
  438. function assertAttributeNotSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
  439. {
  440. return call_user_func_array(
  441. 'PHPUnit_Framework_Assert::assertAttributeNotSame',
  442. func_get_args()
  443. );
  444. }
  445. /**
  446. * Asserts that a variable and an attribute of an object have the same type
  447. * and value.
  448. *
  449. * @param mixed $expected
  450. * @param string $actualAttributeName
  451. * @param object $actualClassOrObject
  452. * @param string $message
  453. */
  454. function assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
  455. {
  456. return call_user_func_array(
  457. 'PHPUnit_Framework_Assert::assertAttributeSame',
  458. func_get_args()
  459. );
  460. }
  461. /**
  462. * Asserts that a class has a specified attribute.
  463. *
  464. * @param string $attributeName
  465. * @param string $className
  466. * @param string $message
  467. *
  468. * @since Method available since Release 3.1.0
  469. */
  470. function assertClassHasAttribute($attributeName, $className, $message = '')
  471. {
  472. return call_user_func_array(
  473. 'PHPUnit_Framework_Assert::assertClassHasAttribute',
  474. func_get_args()
  475. );
  476. }
  477. /**
  478. * Asserts that a class has a specified static attribute.
  479. *
  480. * @param string $attributeName
  481. * @param string $className
  482. * @param string $message
  483. *
  484. * @since Method available since Release 3.1.0
  485. */
  486. function assertClassHasStaticAttribute($attributeName, $className, $message = '')
  487. {
  488. return call_user_func_array(
  489. 'PHPUnit_Framework_Assert::assertClassHasStaticAttribute',
  490. func_get_args()
  491. );
  492. }
  493. /**
  494. * Asserts that a class does not have a specified attribute.
  495. *
  496. * @param string $attributeName
  497. * @param string $className
  498. * @param string $message
  499. *
  500. * @since Method available since Release 3.1.0
  501. */
  502. function assertClassNotHasAttribute($attributeName, $className, $message = '')
  503. {
  504. return call_user_func_array(
  505. 'PHPUnit_Framework_Assert::assertClassNotHasAttribute',
  506. func_get_args()
  507. );
  508. }
  509. /**
  510. * Asserts that a class does not have a specified static attribute.
  511. *
  512. * @param string $attributeName
  513. * @param string $className
  514. * @param string $message
  515. *
  516. * @since Method available since Release 3.1.0
  517. */
  518. function assertClassNotHasStaticAttribute($attributeName, $className, $message = '')
  519. {
  520. return call_user_func_array(
  521. 'PHPUnit_Framework_Assert::assertClassNotHasStaticAttribute',
  522. func_get_args()
  523. );
  524. }
  525. /**
  526. * Asserts that a haystack contains a needle.
  527. *
  528. * @param mixed $needle
  529. * @param mixed $haystack
  530. * @param string $message
  531. * @param bool $ignoreCase
  532. * @param bool $checkForObjectIdentity
  533. * @param bool $checkForNonObjectIdentity
  534. *
  535. * @since Method available since Release 2.1.0
  536. */
  537. function assertContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
  538. {
  539. return call_user_func_array(
  540. 'PHPUnit_Framework_Assert::assertContains',
  541. func_get_args()
  542. );
  543. }
  544. /**
  545. * Asserts that a haystack contains only values of a given type.
  546. *
  547. * @param string $type
  548. * @param mixed $haystack
  549. * @param bool $isNativeType
  550. * @param string $message
  551. *
  552. * @since Method available since Release 3.1.4
  553. */
  554. function assertContainsOnly($type, $haystack, $isNativeType = null, $message = '')
  555. {
  556. return call_user_func_array(
  557. 'PHPUnit_Framework_Assert::assertContainsOnly',
  558. func_get_args()
  559. );
  560. }
  561. /**
  562. * Asserts that a haystack contains only instances of a given classname
  563. *
  564. * @param string $classname
  565. * @param array|Traversable $haystack
  566. * @param string $message
  567. */
  568. function assertContainsOnlyInstancesOf($classname, $haystack, $message = '')
  569. {
  570. return call_user_func_array(
  571. 'PHPUnit_Framework_Assert::assertContainsOnlyInstancesOf',
  572. func_get_args()
  573. );
  574. }
  575. /**
  576. * Asserts the number of elements of an array, Countable or Traversable.
  577. *
  578. * @param int $expectedCount
  579. * @param mixed $haystack
  580. * @param string $message
  581. */
  582. function assertCount($expectedCount, $haystack, $message = '')
  583. {
  584. return call_user_func_array(
  585. 'PHPUnit_Framework_Assert::assertCount',
  586. func_get_args()
  587. );
  588. }
  589. /**
  590. * Asserts that a variable is empty.
  591. *
  592. * @param mixed $actual
  593. * @param string $message
  594. *
  595. * @throws PHPUnit_Framework_AssertionFailedError
  596. */
  597. function assertEmpty($actual, $message = '')
  598. {
  599. return call_user_func_array(
  600. 'PHPUnit_Framework_Assert::assertEmpty',
  601. func_get_args()
  602. );
  603. }
  604. /**
  605. * Asserts that a hierarchy of DOMElements matches.
  606. *
  607. * @param DOMElement $expectedElement
  608. * @param DOMElement $actualElement
  609. * @param bool $checkAttributes
  610. * @param string $message
  611. *
  612. * @since Method available since Release 3.3.0
  613. */
  614. function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes = false, $message = '')
  615. {
  616. return call_user_func_array(
  617. 'PHPUnit_Framework_Assert::assertEqualXMLStructure',
  618. func_get_args()
  619. );
  620. }
  621. /**
  622. * Asserts that two variables are equal.
  623. *
  624. * @param mixed $expected
  625. * @param mixed $actual
  626. * @param string $message
  627. * @param float $delta
  628. * @param int $maxDepth
  629. * @param bool $canonicalize
  630. * @param bool $ignoreCase
  631. */
  632. function assertEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
  633. {
  634. return call_user_func_array(
  635. 'PHPUnit_Framework_Assert::assertEquals',
  636. func_get_args()
  637. );
  638. }
  639. /**
  640. * Asserts that a condition is not true.
  641. *
  642. * @param bool $condition
  643. * @param string $message
  644. *
  645. * @throws PHPUnit_Framework_AssertionFailedError
  646. */
  647. function assertNotTrue($condition, $message = '')
  648. {
  649. return call_user_func_array(
  650. 'PHPUnit_Framework_Assert::assertNotTrue',
  651. func_get_args()
  652. );
  653. }
  654. /**
  655. * Asserts that a condition is false.
  656. *
  657. * @param bool $condition
  658. * @param string $message
  659. *
  660. * @throws PHPUnit_Framework_AssertionFailedError
  661. */
  662. function assertFalse($condition, $message = '')
  663. {
  664. return call_user_func_array(
  665. 'PHPUnit_Framework_Assert::assertFalse',
  666. func_get_args()
  667. );
  668. }
  669. /**
  670. * Asserts that the contents of one file is equal to the contents of another
  671. * file.
  672. *
  673. * @param string $expected
  674. * @param string $actual
  675. * @param string $message
  676. * @param bool $canonicalize
  677. * @param bool $ignoreCase
  678. *
  679. * @since Method available since Release 3.2.14
  680. */
  681. function assertFileEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
  682. {
  683. return call_user_func_array(
  684. 'PHPUnit_Framework_Assert::assertFileEquals',
  685. func_get_args()
  686. );
  687. }
  688. /**
  689. * Asserts that a file exists.
  690. *
  691. * @param string $filename
  692. * @param string $message
  693. *
  694. * @since Method available since Release 3.0.0
  695. */
  696. function assertFileExists($filename, $message = '')
  697. {
  698. return call_user_func_array(
  699. 'PHPUnit_Framework_Assert::assertFileExists',
  700. func_get_args()
  701. );
  702. }
  703. /**
  704. * Asserts that the contents of one file is not equal to the contents of
  705. * another file.
  706. *
  707. * @param string $expected
  708. * @param string $actual
  709. * @param string $message
  710. * @param bool $canonicalize
  711. * @param bool $ignoreCase
  712. *
  713. * @since Method available since Release 3.2.14
  714. */
  715. function assertFileNotEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
  716. {
  717. return call_user_func_array(
  718. 'PHPUnit_Framework_Assert::assertFileNotEquals',
  719. func_get_args()
  720. );
  721. }
  722. /**
  723. * Asserts that a file does not exist.
  724. *
  725. * @param string $filename
  726. * @param string $message
  727. *
  728. * @since Method available since Release 3.0.0
  729. */
  730. function assertFileNotExists($filename, $message = '')
  731. {
  732. return call_user_func_array(
  733. 'PHPUnit_Framework_Assert::assertFileNotExists',
  734. func_get_args()
  735. );
  736. }
  737. /**
  738. * Asserts that a value is greater than another value.
  739. *
  740. * @param mixed $expected
  741. * @param mixed $actual
  742. * @param string $message
  743. *
  744. * @since Method available since Release 3.1.0
  745. */
  746. function assertGreaterThan($expected, $actual, $message = '')
  747. {
  748. return call_user_func_array(
  749. 'PHPUnit_Framework_Assert::assertGreaterThan',
  750. func_get_args()
  751. );
  752. }
  753. /**
  754. * Asserts that a value is greater than or equal to another value.
  755. *
  756. * @param mixed $expected
  757. * @param mixed $actual
  758. * @param string $message
  759. *
  760. * @since Method available since Release 3.1.0
  761. */
  762. function assertGreaterThanOrEqual($expected, $actual, $message = '')
  763. {
  764. return call_user_func_array(
  765. 'PHPUnit_Framework_Assert::assertGreaterThanOrEqual',
  766. func_get_args()
  767. );
  768. }
  769. /**
  770. * Asserts that a variable is of a given type.
  771. *
  772. * @param string $expected
  773. * @param mixed $actual
  774. * @param string $message
  775. *
  776. * @since Method available since Release 3.5.0
  777. */
  778. function assertInstanceOf($expected, $actual, $message = '')
  779. {
  780. return call_user_func_array(
  781. 'PHPUnit_Framework_Assert::assertInstanceOf',
  782. func_get_args()
  783. );
  784. }
  785. /**
  786. * Asserts that a variable is of a given type.
  787. *
  788. * @param string $expected
  789. * @param mixed $actual
  790. * @param string $message
  791. *
  792. * @since Method available since Release 3.5.0
  793. */
  794. function assertInternalType($expected, $actual, $message = '')
  795. {
  796. return call_user_func_array(
  797. 'PHPUnit_Framework_Assert::assertInternalType',
  798. func_get_args()
  799. );
  800. }
  801. /**
  802. * Asserts that a string is a valid JSON string.
  803. *
  804. * @param string $actualJson
  805. * @param string $message
  806. *
  807. * @since Method available since Release 3.7.20
  808. */
  809. function assertJson($actualJson, $message = '')
  810. {
  811. return call_user_func_array(
  812. 'PHPUnit_Framework_Assert::assertJson',
  813. func_get_args()
  814. );
  815. }
  816. /**
  817. * Asserts that two JSON files are equal.
  818. *
  819. * @param string $expectedFile
  820. * @param string $actualFile
  821. * @param string $message
  822. */
  823. function assertJsonFileEqualsJsonFile($expectedFile, $actualFile, $message = '')
  824. {
  825. return call_user_func_array(
  826. 'PHPUnit_Framework_Assert::assertJsonFileEqualsJsonFile',
  827. func_get_args()
  828. );
  829. }
  830. /**
  831. * Asserts that two JSON files are not equal.
  832. *
  833. * @param string $expectedFile
  834. * @param string $actualFile
  835. * @param string $message
  836. */
  837. function assertJsonFileNotEqualsJsonFile($expectedFile, $actualFile, $message = '')
  838. {
  839. return call_user_func_array(
  840. 'PHPUnit_Framework_Assert::assertJsonFileNotEqualsJsonFile',
  841. func_get_args()
  842. );
  843. }
  844. /**
  845. * Asserts that the generated JSON encoded object and the content of the given file are equal.
  846. *
  847. * @param string $expectedFile
  848. * @param string $actualJson
  849. * @param string $message
  850. */
  851. function assertJsonStringEqualsJsonFile($expectedFile, $actualJson, $message = '')
  852. {
  853. return call_user_func_array(
  854. 'PHPUnit_Framework_Assert::assertJsonStringEqualsJsonFile',
  855. func_get_args()
  856. );
  857. }
  858. /**
  859. * Asserts that two given JSON encoded objects or arrays are equal.
  860. *
  861. * @param string $expectedJson
  862. * @param string $actualJson
  863. * @param string $message
  864. */
  865. function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = '')
  866. {
  867. return call_user_func_array(
  868. 'PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString',
  869. func_get_args()
  870. );
  871. }
  872. /**
  873. * Asserts that the generated JSON encoded object and the content of the given file are not equal.
  874. *
  875. * @param string $expectedFile
  876. * @param string $actualJson
  877. * @param string $message
  878. */
  879. function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = '')
  880. {
  881. return call_user_func_array(
  882. 'PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonFile',
  883. func_get_args()
  884. );
  885. }
  886. /**
  887. * Asserts that two given JSON encoded objects or arrays are not equal.
  888. *
  889. * @param string $expectedJson
  890. * @param string $actualJson
  891. * @param string $message
  892. */
  893. function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, $message = '')
  894. {
  895. return call_user_func_array(
  896. 'PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonString',
  897. func_get_args()
  898. );
  899. }
  900. /**
  901. * Asserts that a value is smaller than another value.
  902. *
  903. * @param mixed $expected
  904. * @param mixed $actual
  905. * @param string $message
  906. *
  907. * @since Method available since Release 3.1.0
  908. */
  909. function assertLessThan($expected, $actual, $message = '')
  910. {
  911. return call_user_func_array(
  912. 'PHPUnit_Framework_Assert::assertLessThan',
  913. func_get_args()
  914. );
  915. }
  916. /**
  917. * Asserts that a value is smaller than or equal to another value.
  918. *
  919. * @param mixed $expected
  920. * @param mixed $actual
  921. * @param string $message
  922. *
  923. * @since Method available since Release 3.1.0
  924. */
  925. function assertLessThanOrEqual($expected, $actual, $message = '')
  926. {
  927. return call_user_func_array(
  928. 'PHPUnit_Framework_Assert::assertLessThanOrEqual',
  929. func_get_args()
  930. );
  931. }
  932. /**
  933. * Asserts that a variable is finite.
  934. *
  935. * @param mixed $actual
  936. * @param string $message
  937. */
  938. function assertFinite($actual, $message = '')
  939. {
  940. return call_user_func_array(
  941. 'PHPUnit_Framework_Assert::assertFinite',
  942. func_get_args()
  943. );
  944. }
  945. /**
  946. * Asserts that a variable is infinite.
  947. *
  948. * @param mixed $actual
  949. * @param string $message
  950. */
  951. function assertInfinite($actual, $message = '')
  952. {
  953. return call_user_func_array(
  954. 'PHPUnit_Framework_Assert::assertInfinite',
  955. func_get_args()
  956. );
  957. }
  958. /**
  959. * Asserts that a variable is nan.
  960. *
  961. * @param mixed $actual
  962. * @param string $message
  963. */
  964. function assertNan($actual, $message = '')
  965. {
  966. return call_user_func_array(
  967. 'PHPUnit_Framework_Assert::assertNan',
  968. func_get_args()
  969. );
  970. }
  971. /**
  972. * Asserts that a haystack does not contain a needle.
  973. *
  974. * @param mixed $needle
  975. * @param mixed $haystack
  976. * @param string $message
  977. * @param bool $ignoreCase
  978. * @param bool $checkForObjectIdentity
  979. * @param bool $checkForNonObjectIdentity
  980. *
  981. * @since Method available since Release 2.1.0
  982. */
  983. function assertNotContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
  984. {
  985. return call_user_func_array(
  986. 'PHPUnit_Framework_Assert::assertNotContains',
  987. func_get_args()
  988. );
  989. }
  990. /**
  991. * Asserts that a haystack does not contain only values of a given type.
  992. *
  993. * @param string $type
  994. * @param mixed $haystack
  995. * @param bool $isNativeType
  996. * @param string $message
  997. *
  998. * @since Method available since Release 3.1.4
  999. */
  1000. function assertNotContainsOnly($type, $haystack, $isNativeType = null, $message = '')
  1001. {
  1002. return call_user_func_array(
  1003. 'PHPUnit_Framework_Assert::assertNotContainsOnly',
  1004. func_get_args()
  1005. );
  1006. }
  1007. /**
  1008. * Asserts the number of elements of an array, Countable or Traversable.
  1009. *
  1010. * @param int $expectedCount
  1011. * @param mixed $haystack
  1012. * @param string $message
  1013. */
  1014. function assertNotCount($expectedCount, $haystack, $message = '')
  1015. {
  1016. return call_user_func_array(
  1017. 'PHPUnit_Framework_Assert::assertNotCount',
  1018. func_get_args()
  1019. );
  1020. }
  1021. /**
  1022. * Asserts that a variable is not empty.
  1023. *
  1024. * @param mixed $actual
  1025. * @param string $message
  1026. *
  1027. * @throws PHPUnit_Framework_AssertionFailedError
  1028. */
  1029. function assertNotEmpty($actual, $message = '')
  1030. {
  1031. return call_user_func_array(
  1032. 'PHPUnit_Framework_Assert::assertNotEmpty',
  1033. func_get_args()
  1034. );
  1035. }
  1036. /**
  1037. * Asserts that two variables are not equal.
  1038. *
  1039. * @param mixed $expected
  1040. * @param mixed $actual
  1041. * @param string $message
  1042. * @param float $delta
  1043. * @param int $maxDepth
  1044. * @param bool $canonicalize
  1045. * @param bool $ignoreCase
  1046. *
  1047. * @since Method available since Release 2.3.0
  1048. */
  1049. function assertNotEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
  1050. {
  1051. return call_user_func_array(
  1052. 'PHPUnit_Framework_Assert::assertNotEquals',
  1053. func_get_args()
  1054. );
  1055. }
  1056. /**
  1057. * Asserts that a variable is not of a given type.
  1058. *
  1059. * @param string $expected
  1060. * @param mixed $actual
  1061. * @param string $message
  1062. *
  1063. * @since Method available since Release 3.5.0
  1064. */
  1065. function assertNotInstanceOf($expected, $actual, $message = '')
  1066. {
  1067. return call_user_func_array(
  1068. 'PHPUnit_Framework_Assert::assertNotInstanceOf',
  1069. func_get_args()
  1070. );
  1071. }
  1072. /**
  1073. * Asserts that a variable is not of a given type.
  1074. *
  1075. * @param string $expected
  1076. * @param mixed $actual
  1077. * @param string $message
  1078. *
  1079. * @since Method available since Release 3.5.0
  1080. */
  1081. function assertNotInternalType($expected, $actual, $message = '')
  1082. {
  1083. return call_user_func_array(
  1084. 'PHPUnit_Framework_Assert::assertNotInternalType',
  1085. func_get_args()
  1086. );
  1087. }
  1088. /**
  1089. * Asserts that a condition is not false.
  1090. *
  1091. * @param bool $condition
  1092. * @param string $message
  1093. *
  1094. * @throws PHPUnit_Framework_AssertionFailedError
  1095. */
  1096. function assertNotFalse($condition, $message = '')
  1097. {
  1098. return call_user_func_array(
  1099. 'PHPUnit_Framework_Assert::assertNotFalse',
  1100. func_get_args()
  1101. );
  1102. }
  1103. /**
  1104. * Asserts that a variable is not null.
  1105. *
  1106. * @param mixed $actual
  1107. * @param string $message
  1108. */
  1109. function assertNotNull($actual, $message = '')
  1110. {
  1111. return call_user_func_array(
  1112. 'PHPUnit_Framework_Assert::assertNotNull',
  1113. func_get_args()
  1114. );
  1115. }
  1116. /**
  1117. * Asserts that a string does not match a given regular expression.
  1118. *
  1119. * @param string $pattern
  1120. * @param string $string
  1121. * @param string $message
  1122. *
  1123. * @since Method available since Release 2.1.0
  1124. */
  1125. function assertNotRegExp($pattern, $string, $message = '')
  1126. {
  1127. return call_user_func_array(
  1128. 'PHPUnit_Framework_Assert::assertNotRegExp',
  1129. func_get_args()
  1130. );
  1131. }
  1132. /**
  1133. * Asserts that two variables do not have the same type and value.
  1134. * Used on objects, it asserts that two variables do not reference
  1135. * the same object.
  1136. *
  1137. * @param mixed $expected
  1138. * @param mixed $actual
  1139. * @param string $message
  1140. */
  1141. function assertNotSame($expected, $actual, $message = '')
  1142. {
  1143. return call_user_func_array(
  1144. 'PHPUnit_Framework_Assert::assertNotSame',
  1145. func_get_args()
  1146. );
  1147. }
  1148. /**
  1149. * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
  1150. * is not the same.
  1151. *
  1152. * @param array|Countable|Traversable $expected
  1153. * @param array|Countable|Traversable $actual
  1154. * @param string $message
  1155. */
  1156. function assertNotSameSize($expected, $actual, $message = '')
  1157. {
  1158. return call_user_func_array(
  1159. 'PHPUnit_Framework_Assert::assertNotSameSize',
  1160. func_get_args()
  1161. );
  1162. }
  1163. /**
  1164. * Asserts that a variable is null.
  1165. *
  1166. * @param mixed $actual
  1167. * @param string $message
  1168. */
  1169. function assertNull($actual, $message = '')
  1170. {
  1171. return call_user_func_array(
  1172. 'PHPUnit_Framework_Assert::assertNull',
  1173. func_get_args()
  1174. );
  1175. }
  1176. /**
  1177. * Asserts that an object has a specified attribute.
  1178. *
  1179. * @param string $attributeName
  1180. * @param object $object
  1181. * @param string $message
  1182. *
  1183. * @since Method available since Release 3.0.0
  1184. */
  1185. function assertObjectHasAttribute($attributeName, $object, $message = '')
  1186. {
  1187. return call_user_func_array(
  1188. 'PHPUnit_Framework_Assert::assertObjectHasAttribute',
  1189. func_get_args()
  1190. );
  1191. }
  1192. /**
  1193. * Asserts that an object does not have a specified attribute.
  1194. *
  1195. * @param string $attributeName
  1196. * @param object $object
  1197. * @param string $message
  1198. *
  1199. * @since Method available since Release 3.0.0
  1200. */
  1201. function assertObjectNotHasAttribute($attributeName, $object, $message = '')
  1202. {
  1203. return call_user_func_array(
  1204. 'PHPUnit_Framework_Assert::assertObjectNotHasAttribute',
  1205. func_get_args()
  1206. );
  1207. }
  1208. /**
  1209. * Asserts that a string matches a given regular expression.
  1210. *
  1211. * @param string $pattern
  1212. * @param string $string
  1213. * @param string $message
  1214. */
  1215. function assertRegExp($pattern, $string, $message = '')
  1216. {
  1217. return call_user_func_array(
  1218. 'PHPUnit_Framework_Assert::assertRegExp',
  1219. func_get_args()
  1220. );
  1221. }
  1222. /**
  1223. * Asserts that two variables have the same type and value.
  1224. * Used on objects, it asserts that two variables reference
  1225. * the same object.
  1226. *
  1227. * @param mixed $expected
  1228. * @param mixed $actual
  1229. * @param string $message
  1230. */
  1231. function assertSame($expected, $actual, $message = '')
  1232. {
  1233. return call_user_func_array(
  1234. 'PHPUnit_Framework_Assert::assertSame',
  1235. func_get_args()
  1236. );
  1237. }
  1238. /**
  1239. * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
  1240. * is the same.
  1241. *
  1242. * @param array|Countable|Traversable $expected
  1243. * @param array|Countable|Traversable $actual
  1244. * @param string $message
  1245. */
  1246. function assertSameSize($expected, $actual, $message = '')
  1247. {
  1248. return call_user_func_array(
  1249. 'PHPUnit_Framework_Assert::assertSameSize',
  1250. func_get_args()
  1251. );
  1252. }
  1253. /**
  1254. * Asserts that a string ends not with a given prefix.
  1255. *
  1256. * @param string $suffix
  1257. * @param string $string
  1258. * @param string $message
  1259. *
  1260. * @since Method available since Release 3.4.0
  1261. */
  1262. function assertStringEndsNotWith($suffix, $string, $message = '')
  1263. {
  1264. return call_user_func_array(
  1265. 'PHPUnit_Framework_Assert::assertStringEndsNotWith',
  1266. func_get_args()
  1267. );
  1268. }
  1269. /**
  1270. * Asserts that a string ends with a given prefix.
  1271. *
  1272. * @param string $suffix
  1273. * @param string $string
  1274. * @param string $message
  1275. *
  1276. * @since Method available since Release 3.4.0
  1277. */
  1278. function assertStringEndsWith($suffix, $string, $message = '')
  1279. {
  1280. return call_user_func_array(
  1281. 'PHPUnit_Framework_Assert::assertStringEndsWith',
  1282. func_get_args()
  1283. );
  1284. }
  1285. /**
  1286. * Asserts that the contents of a string is equal
  1287. * to the contents of a file.
  1288. *
  1289. * @param string $expectedFile
  1290. * @param string $actualString
  1291. * @param string $message
  1292. * @param bool $canonicalize
  1293. * @param bool $ignoreCase
  1294. *
  1295. * @since Method available since Release 3.3.0
  1296. */
  1297. function assertStringEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
  1298. {
  1299. return call_user_func_array(
  1300. 'PHPUnit_Framework_Assert::assertStringEqualsFile',
  1301. func_get_args()
  1302. );
  1303. }
  1304. /**
  1305. * Asserts that a string matches a given format string.
  1306. *
  1307. * @param string $format
  1308. * @param string $string
  1309. * @param string $message
  1310. *
  1311. * @since Method available since Release 3.5.0
  1312. */
  1313. function assertStringMatchesFormat($format, $string, $message = '')
  1314. {
  1315. return call_user_func_array(
  1316. 'PHPUnit_Framework_Assert::assertStringMatchesFormat',
  1317. func_get_args()
  1318. );
  1319. }
  1320. /**
  1321. * Asserts that a string matches a given format file.
  1322. *
  1323. * @param string $formatFile
  1324. * @param string $string
  1325. * @param string $message
  1326. *
  1327. * @since Method available since Release 3.5.0
  1328. */
  1329. function assertStringMatchesFormatFile($formatFile, $string, $message = '')
  1330. {
  1331. return call_user_func_array(
  1332. 'PHPUnit_Framework_Assert::assertStringMatchesFormatFile',
  1333. func_get_args()
  1334. );
  1335. }
  1336. /**
  1337. * Asserts that the contents of a string is not equal
  1338. * to the contents of a file.
  1339. *
  1340. * @param string $expectedFile
  1341. * @param string $actualString
  1342. * @param string $message
  1343. * @param bool $canonicalize
  1344. * @param bool $ignoreCase
  1345. *
  1346. * @since Method available since Release 3.3.0
  1347. */
  1348. function assertStringNotEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
  1349. {
  1350. return call_user_func_array(
  1351. 'PHPUnit_Framework_Assert::assertStringNotEqualsFile',
  1352. func_get_args()
  1353. );
  1354. }
  1355. /**
  1356. * Asserts that a string does not match a given format string.
  1357. *
  1358. * @param string $format
  1359. * @param string $string
  1360. * @param string $message
  1361. *
  1362. * @since Method available since Release 3.5.0
  1363. */
  1364. function assertStringNotMatchesFormat($format, $string, $message = '')
  1365. {
  1366. return call_user_func_array(
  1367. 'PHPUnit_Framework_Assert::assertStringNotMatchesFormat',
  1368. func_get_args()
  1369. );
  1370. }
  1371. /**
  1372. * Asserts that a string does not match a given format string.
  1373. *
  1374. * @param string $formatFile
  1375. * @param string $string
  1376. * @param string $message
  1377. *
  1378. * @since Method available since Release 3.5.0
  1379. */
  1380. function assertStringNotMatchesFormatFile($formatFile, $string, $message = '')
  1381. {
  1382. return call_user_func_array(
  1383. 'PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile',
  1384. func_get_args()
  1385. );
  1386. }
  1387. /**
  1388. * Asserts that a string starts not with a given prefix.
  1389. *
  1390. * @param string $prefix
  1391. * @param string $string
  1392. * @param string $message
  1393. *
  1394. * @since Method available since Release 3.4.0
  1395. */
  1396. function assertStringStartsNotWith($prefix, $string, $message = '')
  1397. {
  1398. return call_user_func_array(
  1399. 'PHPUnit_Framework_Assert::assertStringStartsNotWith',
  1400. func_get_args()
  1401. );
  1402. }
  1403. /**
  1404. * Asserts that a string starts with a given prefix.
  1405. *
  1406. * @param string $prefix
  1407. * @param string $string
  1408. * @param string $message
  1409. *
  1410. * @since Method available since Release 3.4.0
  1411. */
  1412. function assertStringStartsWith($prefix, $string, $message = '')
  1413. {
  1414. return call_user_func_array(
  1415. 'PHPUnit_Framework_Assert::assertStringStartsWith',
  1416. func_get_args()
  1417. );
  1418. }
  1419. /**
  1420. * Evaluates a PHPUnit_Framework_Constraint matcher object.
  1421. *
  1422. * @param mixed $value
  1423. * @param PHPUnit_Framework_Constraint $constraint
  1424. * @param string $message
  1425. *
  1426. * @since Method available since Release 3.0.0
  1427. */
  1428. function assertThat($value, PHPUnit_Framework_Constraint $constraint, $message = '')
  1429. {
  1430. return call_user_func_array(
  1431. 'PHPUnit_Framework_Assert::assertThat',
  1432. func_get_args()
  1433. );
  1434. }
  1435. /**
  1436. * Asserts that a condition is true.
  1437. *
  1438. * @param bool $condition
  1439. * @param string $message
  1440. *
  1441. * @throws PHPUnit_Framework_AssertionFailedError
  1442. */
  1443. function assertTrue($condition, $message = '')
  1444. {
  1445. return call_user_func_array(
  1446. 'PHPUnit_Framework_Assert::assertTrue',
  1447. func_get_args()
  1448. );
  1449. }
  1450. /**
  1451. * Asserts that two XML files are equal.
  1452. *
  1453. * @param string $expectedFile
  1454. * @param string $actualFile
  1455. * @param string $message
  1456. *
  1457. * @since Method available since Release 3.1.0
  1458. */
  1459. function assertXmlFileEqualsXmlFile($expectedFile, $actualFile, $message = '')
  1460. {
  1461. return call_user_func_array(
  1462. 'PHPUnit_Framework_Assert::assertXmlFileEqualsXmlFile',
  1463. func_get_args()
  1464. );
  1465. }
  1466. /**
  1467. * Asserts that two XML files are not equal.
  1468. *
  1469. * @param string $expectedFile
  1470. * @param string $actualFile
  1471. * @param string $message
  1472. *
  1473. * @since Method available since Release 3.1.0
  1474. */
  1475. function assertXmlFileNotEqualsXmlFile($expectedFile, $actualFile, $message = '')
  1476. {
  1477. return call_user_func_array(
  1478. 'PHPUnit_Framework_Assert::assertXmlFileNotEqualsXmlFile',
  1479. func_get_args()
  1480. );
  1481. }
  1482. /**
  1483. * Asserts that two XML documents are equal.
  1484. *
  1485. * @param string $expectedFile
  1486. * @param string $actualXml
  1487. * @param string $message
  1488. *
  1489. * @since Method available since Release 3.3.0
  1490. */
  1491. function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = '')
  1492. {
  1493. return call_user_func_array(
  1494. 'PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile',
  1495. func_get_args()
  1496. );
  1497. }
  1498. /**
  1499. * Asserts that two XML documents are equal.
  1500. *
  1501. * @param string $expectedXml
  1502. * @param string $actualXml
  1503. * @param string $message
  1504. *
  1505. * @since Method available since Release 3.1.0
  1506. */
  1507. function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = '')
  1508. {
  1509. return call_user_func_array(
  1510. 'PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString',
  1511. func_get_args()
  1512. );
  1513. }
  1514. /**
  1515. * Asserts that two XML documents are not equal.
  1516. *
  1517. * @param string $expectedFile
  1518. * @param string $actualXml
  1519. * @param string $message
  1520. *
  1521. * @since Method available since Release 3.3.0
  1522. */
  1523. function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = '')
  1524. {
  1525. return call_user_func_array(
  1526. 'PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlFile',
  1527. func_get_args()
  1528. );
  1529. }
  1530. /**
  1531. * Asserts that two XML documents are not equal.
  1532. *
  1533. * @param string $expectedXml
  1534. * @param string $actualXml
  1535. * @param string $message
  1536. *
  1537. * @since Method available since Release 3.1.0
  1538. */
  1539. function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = '')
  1540. {
  1541. return call_user_func_array(
  1542. 'PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlString',
  1543. func_get_args()
  1544. );
  1545. }
  1546. /**
  1547. * Returns a matcher that matches when the method is executed
  1548. * at the given $index.
  1549. *
  1550. * @param int $index
  1551. *
  1552. * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
  1553. *
  1554. * @since Method available since Release 3.0.0
  1555. */
  1556. function at($index)
  1557. {
  1558. return call_user_func_array(
  1559. 'PHPUnit_Framework_TestCase::at',
  1560. func_get_args()
  1561. );
  1562. }
  1563. /**
  1564. * Returns a matcher that matches when the method is executed at least once.
  1565. *
  1566. * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce
  1567. *
  1568. * @since Method available since Release 3.0.0
  1569. */
  1570. function atLeastOnce()
  1571. {
  1572. return call_user_func_array(
  1573. 'PHPUnit_Framework_TestCase::atLeastOnce',
  1574. func_get_args()
  1575. );
  1576. }
  1577. /**
  1578. * Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
  1579. *
  1580. * @param PHPUnit_Framework_Constraint $constraint
  1581. * @param string $attributeName
  1582. *
  1583. * @return PHPUnit_Framework_Constraint_Attribute
  1584. *
  1585. * @since Method available since Release 3.1.0
  1586. */
  1587. function attribute(PHPUnit_Framework_Constraint $constraint, $attributeName)
  1588. {
  1589. return call_user_func_array(
  1590. 'PHPUnit_Framework_Assert::attribute',
  1591. func_get_args()
  1592. );
  1593. }
  1594. /**
  1595. * Returns a PHPUnit_Framework_Constraint_IsEqual matcher object
  1596. * that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher
  1597. * object.
  1598. *
  1599. * @param string $attributeName
  1600. * @param mixed $value
  1601. * @param float $delta
  1602. * @param int $maxDepth
  1603. * @param bool $canonicalize
  1604. * @param bool $ignoreCase
  1605. *
  1606. * @return PHPUnit_Framework_Constraint_Attribute
  1607. *
  1608. * @since Method available since Release 3.1.0
  1609. */
  1610. function attributeEqualTo($attributeName, $value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
  1611. {
  1612. return call_user_func_array(
  1613. 'PHPUnit_Framework_Assert::attributeEqualTo',
  1614. func_get_args()
  1615. );
  1616. }
  1617. /**
  1618. * Returns a PHPUnit_Framework_Constraint_Callback matcher object.
  1619. *
  1620. * @param callable $callback
  1621. *
  1622. * @return PHPUnit_Framework_Constraint_Callback
  1623. */
  1624. function callback($callback)
  1625. {
  1626. return call_user_func_array(
  1627. 'PHPUnit_Framework_Assert::callback',
  1628. func_get_args()
  1629. );
  1630. }
  1631. /**
  1632. * Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
  1633. *
  1634. * @param string $attributeName
  1635. *
  1636. * @return PHPUnit_Framework_Constraint_ClassHasAttribute
  1637. *
  1638. * @since Method available since Release 3.1.0
  1639. */
  1640. function classHasAttribute($attributeName)
  1641. {
  1642. return call_user_func_array(
  1643. 'PHPUnit_Framework_Assert::classHasAttribute',
  1644. func_get_args()
  1645. );
  1646. }
  1647. /**
  1648. * Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher
  1649. * object.
  1650. *
  1651. * @param string $attributeName
  1652. *
  1653. * @return PHPUnit_Framework_Constraint_ClassHasStaticAttribute
  1654. *
  1655. * @since Method available since Release 3.1.0
  1656. */
  1657. function classHasStaticAttribute($attributeName)
  1658. {
  1659. return call_user_func_array(
  1660. 'PHPUnit_Framework_Assert::classHasStaticAttribute',
  1661. func_get_args()
  1662. );
  1663. }
  1664. /**
  1665. * Returns a PHPUnit_Framework_Constraint_TraversableContains matcher
  1666. * object.
  1667. *
  1668. * @param mixed $value
  1669. * @param bool $checkForObjectIdentity
  1670. * @param bool $checkForNonObjectIdentity
  1671. *
  1672. * @return PHPUnit_Framework_Constraint_TraversableContains
  1673. *
  1674. * @since Method available since Release 3.0.0
  1675. */
  1676. function contains($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
  1677. {
  1678. return call_user_func_array(
  1679. 'PHPUnit_Framework_Assert::contains',
  1680. func_get_args()
  1681. );
  1682. }
  1683. /**
  1684. * Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
  1685. * object.
  1686. *
  1687. * @param string $type
  1688. *
  1689. * @return PHPUnit_Framework_Constraint_TraversableContainsOnly
  1690. *
  1691. * @since Method available since Release 3.1.4
  1692. */
  1693. function containsOnly($type)
  1694. {
  1695. return call_user_func_array(
  1696. 'PHPUnit_Framework_Assert::containsOnly',
  1697. func_get_args()
  1698. );
  1699. }
  1700. /**
  1701. * Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
  1702. * object.
  1703. *
  1704. * @param string $classname
  1705. *
  1706. * @return PHPUnit_Framework_Constraint_TraversableContainsOnly
  1707. */
  1708. function containsOnlyInstancesOf($classname)
  1709. {
  1710. return call_user_func_array(
  1711. 'PHPUnit_Framework_Assert::containsOnlyInstancesOf',
  1712. func_get_args()
  1713. );
  1714. }
  1715. /**
  1716. * Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
  1717. *
  1718. * @param mixed $value
  1719. * @param float $delta
  1720. * @param int $maxDepth
  1721. * @param bool $canonicalize
  1722. * @param bool $ignoreCase
  1723. *
  1724. * @return PHPUnit_Framework_Constraint_IsEqual
  1725. *
  1726. * @since Method available since Release 3.0.0
  1727. */
  1728. function equalTo($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
  1729. {
  1730. return call_user_func_array(
  1731. 'PHPUnit_Framework_Assert::equalTo',
  1732. func_get_args()
  1733. );
  1734. }
  1735. /**
  1736. * Returns a matcher that matches when the method is executed
  1737. * exactly $count times.
  1738. *
  1739. * @param int $count
  1740. *
  1741. * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
  1742. *
  1743. * @since Method available since Release 3.0.0
  1744. */
  1745. function exactly($count)
  1746. {
  1747. return call_user_func_array(
  1748. 'PHPUnit_Framework_TestCase::exactly',
  1749. func_get_args()
  1750. );
  1751. }
  1752. /**
  1753. * Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
  1754. *
  1755. * @return PHPUnit_Framework_Constraint_FileExists
  1756. *
  1757. * @since Method available since Release 3.0.0
  1758. */
  1759. function fileExists()
  1760. {
  1761. return call_user_func_array(
  1762. 'PHPUnit_Framework_Assert::fileExists',
  1763. func_get_args()
  1764. );
  1765. }
  1766. /**
  1767. * Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
  1768. *
  1769. * @param mixed $value
  1770. *
  1771. * @return PHPUnit_Framework_Constraint_GreaterThan
  1772. *
  1773. * @since Method available since Release 3.0.0
  1774. */
  1775. function greaterThan($value)
  1776. {
  1777. return call_user_func_array(
  1778. 'PHPUnit_Framework_Assert::greaterThan',
  1779. func_get_args()
  1780. );
  1781. }
  1782. /**
  1783. * Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps
  1784. * a PHPUnit_Framework_Constraint_IsEqual and a
  1785. * PHPUnit_Framework_Constraint_GreaterThan matcher object.
  1786. *
  1787. * @param mixed $value
  1788. *
  1789. * @return PHPUnit_Framework_Constraint_Or
  1790. *
  1791. * @since Method available since Release 3.1.0
  1792. */
  1793. function greaterThanOrEqual($value)
  1794. {
  1795. return call_user_func_array(
  1796. 'PHPUnit_Framework_Assert::greaterThanOrEqual',
  1797. func_get_args()
  1798. );
  1799. }
  1800. /**
  1801. * Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
  1802. *
  1803. * @param mixed $value
  1804. *
  1805. * @return PHPUnit_Framework_Constraint_IsIdentical
  1806. *
  1807. * @since Method available since Release 3.0.0
  1808. */
  1809. function identicalTo($value)
  1810. {
  1811. return call_user_func_array(
  1812. 'PHPUnit_Framework_Assert::identicalTo',
  1813. func_get_args()
  1814. );
  1815. }
  1816. /**
  1817. * Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
  1818. *
  1819. * @return PHPUnit_Framework_Constraint_IsEmpty
  1820. *
  1821. * @since Method available since Release 3.5.0
  1822. */
  1823. function isEmpty()
  1824. {
  1825. return call_user_func_array(
  1826. 'PHPUnit_Framework_Assert::isEmpty',
  1827. func_get_args()
  1828. );
  1829. }
  1830. /**
  1831. * Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
  1832. *
  1833. * @return PHPUnit_Framework_Constraint_IsFalse
  1834. *
  1835. * @since Method available since Release 3.3.0
  1836. */
  1837. function isFalse()
  1838. {
  1839. return call_user_func_array(
  1840. 'PHPUnit_Framework_Assert::isFalse',
  1841. func_get_args()
  1842. );
  1843. }
  1844. /**
  1845. * Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
  1846. *
  1847. * @param string $className
  1848. *
  1849. * @return PHPUnit_Framework_Constraint_IsInstanceOf
  1850. *
  1851. * @since Method available since Release 3.0.0
  1852. */
  1853. function isInstanceOf($className)
  1854. {
  1855. return call_user_func_array(
  1856. 'PHPUnit_Framework_Assert::isInstanceOf',
  1857. func_get_args()
  1858. );
  1859. }
  1860. /**
  1861. * Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
  1862. *
  1863. * @return PHPUnit_Framework_Constraint_IsJson
  1864. *
  1865. * @since Method available since Release 3.7.20
  1866. */
  1867. function isJson()
  1868. {
  1869. return call_user_func_array(
  1870. 'PHPUnit_Framework_Assert::isJson',
  1871. func_get_args()
  1872. );
  1873. }
  1874. /**
  1875. * Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
  1876. *
  1877. * @return PHPUnit_Framework_Constraint_IsNull
  1878. *
  1879. * @since Method available since Release 3.3.0
  1880. */
  1881. function isNull()
  1882. {
  1883. return call_user_func_array(
  1884. 'PHPUnit_Framework_Assert::isNull',
  1885. func_get_args()
  1886. );
  1887. }
  1888. /**
  1889. * Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
  1890. *
  1891. * @return PHPUnit_Framework_Constraint_IsTrue
  1892. *
  1893. * @since Method available since Release 3.3.0
  1894. */
  1895. function isTrue()
  1896. {
  1897. return call_user_func_array(
  1898. 'PHPUnit_Framework_Assert::isTrue',
  1899. func_get_args()
  1900. );
  1901. }
  1902. /**
  1903. * Returns a PHPUnit_Framework_Constraint_IsType matcher object.
  1904. *
  1905. * @param string $type
  1906. *
  1907. * @return PHPUnit_Framework_Constraint_IsType
  1908. *
  1909. * @since Method available since Release 3.0.0
  1910. */
  1911. function isType($type)
  1912. {
  1913. return call_user_func_array(
  1914. 'PHPUnit_Framework_Assert::isType',
  1915. func_get_args()
  1916. );
  1917. }
  1918. /**
  1919. * Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
  1920. *
  1921. * @param mixed $value
  1922. *
  1923. * @return PHPUnit_Framework_Constraint_LessThan
  1924. *
  1925. * @since Method available since Release 3.0.0
  1926. */
  1927. function lessThan($value)
  1928. {
  1929. retur