/tests/_support/_generated/UnitTesterActions.php

https://gitlab.com/mallgroup/mpapi-client · PHP · 460 lines · 98 code · 63 blank · 299 comment · 0 complexity · d302ee8f6432467497f202a3003ef37f MD5 · raw file

  1. <?php //[STAMP] 8710f9ee947b06d4a721a0637ea6627d
  2. namespace _generated;
  3. // This class was automatically generated by build task
  4. // You should not change it manually as it will be overwritten on next build
  5. // @codingStandardsIgnoreFile
  6. use Codeception\Module\Asserts;
  7. use Helper\Unit;
  8. trait UnitTesterActions
  9. {
  10. /**
  11. * @return \Codeception\Scenario
  12. */
  13. abstract protected function getScenario();
  14. /**
  15. * [!] Method is generated. Documentation taken from corresponding module.
  16. *
  17. * Checks that two variables are equal.
  18. *
  19. * @param $expected
  20. * @param $actual
  21. * @param string $message
  22. * @see \Codeception\Module\Asserts::assertEquals()
  23. */
  24. public function assertEquals($expected, $actual, $message = null) {
  25. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
  26. }
  27. /**
  28. * [!] Method is generated. Documentation taken from corresponding module.
  29. *
  30. * Checks that two variables are not equal
  31. *
  32. * @param $expected
  33. * @param $actual
  34. * @param string $message
  35. * @see \Codeception\Module\Asserts::assertNotEquals()
  36. */
  37. public function assertNotEquals($expected, $actual, $message = null) {
  38. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
  39. }
  40. /**
  41. * [!] Method is generated. Documentation taken from corresponding module.
  42. *
  43. * Checks that two variables are same
  44. *
  45. * @param $expected
  46. * @param $actual
  47. * @param string $message
  48. * @return mixed|void
  49. * @see \Codeception\Module\Asserts::assertSame()
  50. */
  51. public function assertSame($expected, $actual, $message = null) {
  52. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
  53. }
  54. /**
  55. * [!] Method is generated. Documentation taken from corresponding module.
  56. *
  57. * Checks that two variables are not same
  58. *
  59. * @param $expected
  60. * @param $actual
  61. * @param string $message
  62. * @see \Codeception\Module\Asserts::assertNotSame()
  63. */
  64. public function assertNotSame($expected, $actual, $message = null) {
  65. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
  66. }
  67. /**
  68. * [!] Method is generated. Documentation taken from corresponding module.
  69. *
  70. * Checks that actual is greater than expected
  71. *
  72. * @param $expected
  73. * @param $actual
  74. * @param string $message
  75. * @see \Codeception\Module\Asserts::assertGreaterThan()
  76. */
  77. public function assertGreaterThan($expected, $actual, $message = null) {
  78. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
  79. }
  80. /**
  81. * [!] Method is generated. Documentation taken from corresponding module.
  82. *
  83. * Checks that actual is greater or equal than expected
  84. *
  85. * @param $expected
  86. * @param $actual
  87. * @param string $message
  88. * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
  89. */
  90. public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
  91. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
  92. }
  93. /**
  94. * [!] Method is generated. Documentation taken from corresponding module.
  95. *
  96. * Checks that actual is less than expected
  97. *
  98. * @param $expected
  99. * @param $actual
  100. * @param string $message
  101. * @see \Codeception\Module\Asserts::assertLessThan()
  102. */
  103. public function assertLessThan($expected, $actual, $message = null) {
  104. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
  105. }
  106. /**
  107. * [!] Method is generated. Documentation taken from corresponding module.
  108. *
  109. * Checks that actual is less or equal than expected
  110. *
  111. * @param $expected
  112. * @param $actual
  113. * @param string $message
  114. * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
  115. */
  116. public function assertLessThanOrEqual($expected, $actual, $message = null) {
  117. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
  118. }
  119. /**
  120. * [!] Method is generated. Documentation taken from corresponding module.
  121. *
  122. * Checks that haystack contains needle
  123. *
  124. * @param $needle
  125. * @param $haystack
  126. * @param string $message
  127. * @see \Codeception\Module\Asserts::assertContains()
  128. */
  129. public function assertContains($needle, $haystack, $message = null) {
  130. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
  131. }
  132. /**
  133. * [!] Method is generated. Documentation taken from corresponding module.
  134. *
  135. * Checks that haystack doesn't contain needle.
  136. *
  137. * @param $needle
  138. * @param $haystack
  139. * @param string $message
  140. * @see \Codeception\Module\Asserts::assertNotContains()
  141. */
  142. public function assertNotContains($needle, $haystack, $message = null) {
  143. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
  144. }
  145. /**
  146. * [!] Method is generated. Documentation taken from corresponding module.
  147. *
  148. * Checks that string match with pattern
  149. *
  150. * @param string $pattern
  151. * @param string $string
  152. * @param string $message
  153. * @see \Codeception\Module\Asserts::assertRegExp()
  154. */
  155. public function assertRegExp($pattern, $string, $message = null) {
  156. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
  157. }
  158. /**
  159. * [!] Method is generated. Documentation taken from corresponding module.
  160. *
  161. * Checks that string not match with pattern
  162. *
  163. * @param string $pattern
  164. * @param string $string
  165. * @param string $message
  166. * @see \Codeception\Module\Asserts::assertNotRegExp()
  167. */
  168. public function assertNotRegExp($pattern, $string, $message = null) {
  169. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
  170. }
  171. /**
  172. * [!] Method is generated. Documentation taken from corresponding module.
  173. *
  174. * Checks that variable is empty.
  175. *
  176. * @param $actual
  177. * @param string $message
  178. * @see \Codeception\Module\Asserts::assertEmpty()
  179. */
  180. public function assertEmpty($actual, $message = null) {
  181. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
  182. }
  183. /**
  184. * [!] Method is generated. Documentation taken from corresponding module.
  185. *
  186. * Checks that variable is not empty.
  187. *
  188. * @param $actual
  189. * @param string $message
  190. * @see \Codeception\Module\Asserts::assertNotEmpty()
  191. */
  192. public function assertNotEmpty($actual, $message = null) {
  193. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
  194. }
  195. /**
  196. * [!] Method is generated. Documentation taken from corresponding module.
  197. *
  198. * Checks that variable is NULL
  199. *
  200. * @param $actual
  201. * @param string $message
  202. * @see \Codeception\Module\Asserts::assertNull()
  203. */
  204. public function assertNull($actual, $message = null) {
  205. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
  206. }
  207. /**
  208. * [!] Method is generated. Documentation taken from corresponding module.
  209. *
  210. * Checks that variable is not NULL
  211. *
  212. * @param $actual
  213. * @param string $message
  214. * @see \Codeception\Module\Asserts::assertNotNull()
  215. */
  216. public function assertNotNull($actual, $message = null) {
  217. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
  218. }
  219. /**
  220. * [!] Method is generated. Documentation taken from corresponding module.
  221. *
  222. * Checks that condition is positive.
  223. *
  224. * @param $condition
  225. * @param string $message
  226. * @see \Codeception\Module\Asserts::assertTrue()
  227. */
  228. public function assertTrue($condition, $message = null) {
  229. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
  230. }
  231. /**
  232. * [!] Method is generated. Documentation taken from corresponding module.
  233. *
  234. * Checks that condition is negative.
  235. *
  236. * @param $condition
  237. * @param string $message
  238. * @see \Codeception\Module\Asserts::assertFalse()
  239. */
  240. public function assertFalse($condition, $message = null) {
  241. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
  242. }
  243. /**
  244. * [!] Method is generated. Documentation taken from corresponding module.
  245. *
  246. * Checks if file exists
  247. *
  248. * @param string $filename
  249. * @param string $message
  250. * @see \Codeception\Module\Asserts::assertFileExists()
  251. */
  252. public function assertFileExists($filename, $message = null) {
  253. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
  254. }
  255. /**
  256. * [!] Method is generated. Documentation taken from corresponding module.
  257. *
  258. * Checks if file doesn't exist
  259. *
  260. * @param string $filename
  261. * @param string $message
  262. * @see \Codeception\Module\Asserts::assertFileNotExists()
  263. */
  264. public function assertFileNotExists($filename, $message = null) {
  265. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
  266. }
  267. /**
  268. * [!] Method is generated. Documentation taken from corresponding module.
  269. *
  270. * @param $expected
  271. * @param $actual
  272. * @param $description
  273. * @see \Codeception\Module\Asserts::assertGreaterOrEquals()
  274. */
  275. public function assertGreaterOrEquals($expected, $actual, $description = null) {
  276. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args()));
  277. }
  278. /**
  279. * [!] Method is generated. Documentation taken from corresponding module.
  280. *
  281. * @param $expected
  282. * @param $actual
  283. * @param $description
  284. * @see \Codeception\Module\Asserts::assertLessOrEquals()
  285. */
  286. public function assertLessOrEquals($expected, $actual, $description = null) {
  287. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args()));
  288. }
  289. /**
  290. * [!] Method is generated. Documentation taken from corresponding module.
  291. *
  292. * @param $actual
  293. * @param $description
  294. * @see \Codeception\Module\Asserts::assertIsEmpty()
  295. */
  296. public function assertIsEmpty($actual, $description = null) {
  297. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args()));
  298. }
  299. /**
  300. * [!] Method is generated. Documentation taken from corresponding module.
  301. *
  302. * @param $key
  303. * @param $actual
  304. * @param $description
  305. * @see \Codeception\Module\Asserts::assertArrayHasKey()
  306. */
  307. public function assertArrayHasKey($key, $actual, $description = null) {
  308. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args()));
  309. }
  310. /**
  311. * [!] Method is generated. Documentation taken from corresponding module.
  312. *
  313. * @param $key
  314. * @param $actual
  315. * @param $description
  316. * @see \Codeception\Module\Asserts::assertArrayNotHasKey()
  317. */
  318. public function assertArrayNotHasKey($key, $actual, $description = null) {
  319. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args()));
  320. }
  321. /**
  322. * [!] Method is generated. Documentation taken from corresponding module.
  323. *
  324. * @param $class
  325. * @param $actual
  326. * @param $description
  327. * @see \Codeception\Module\Asserts::assertInstanceOf()
  328. */
  329. public function assertInstanceOf($class, $actual, $description = null) {
  330. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args()));
  331. }
  332. /**
  333. * [!] Method is generated. Documentation taken from corresponding module.
  334. *
  335. * @param $class
  336. * @param $actual
  337. * @param $description
  338. * @see \Codeception\Module\Asserts::assertNotInstanceOf()
  339. */
  340. public function assertNotInstanceOf($class, $actual, $description = null) {
  341. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args()));
  342. }
  343. /**
  344. * [!] Method is generated. Documentation taken from corresponding module.
  345. *
  346. * @param $type
  347. * @param $actual
  348. * @param $description
  349. * @see \Codeception\Module\Asserts::assertInternalType()
  350. */
  351. public function assertInternalType($type, $actual, $description = null) {
  352. return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInternalType', func_get_args()));
  353. }
  354. /**
  355. * [!] Method is generated. Documentation taken from corresponding module.
  356. *
  357. * Fails the test with message.
  358. *
  359. * @param $message
  360. * @see \Codeception\Module\Asserts::fail()
  361. */
  362. public function fail($message) {
  363. return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args()));
  364. }
  365. /**
  366. * [!] Method is generated. Documentation taken from corresponding module.
  367. *
  368. * Handles and checks exception called inside callback function.
  369. * Either exception class name or exception instance should be provided.
  370. *
  371. * ```php
  372. * <?php
  373. * $I->expectException(MyException::class, function() {
  374. * $this->doSomethingBad();
  375. * });
  376. *
  377. * $I->expectException(new MyException(), function() {
  378. * $this->doSomethingBad();
  379. * });
  380. * ```
  381. * If you want to check message or exception code, you can pass them with exception instance:
  382. * ```php
  383. * <?php
  384. * // will check that exception MyException is thrown with "Don't do bad things" message
  385. * $I->expectException(new MyException("Don't do bad things"), function() {
  386. * $this->doSomethingBad();
  387. * });
  388. * ```
  389. *
  390. * @param $exception string or \Exception
  391. * @param $callback
  392. * @see \Codeception\Module\Asserts::expectException()
  393. */
  394. public function expectException($exception, $callback) {
  395. return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
  396. }
  397. }