/library/Inspekt/CageTest.php

https://bitbucket.org/khuongduybui/openfisma · PHP · 661 lines · 358 code · 62 blank · 241 comment · 0 complexity · 4dc974f6ba75a016646e256b7298b34b MD5 · raw file

  1. <?php
  2. require_once 'PHPUnit/Framework.php';
  3. require_once 'Cage.php';
  4. /**
  5. * Test class for Inspekt_Cage.
  6. * Generated by PHPUnit on 2009-08-10 at 16:30:49.
  7. */
  8. class Inspekt_CageTest extends PHPUnit_Framework_TestCase
  9. {
  10. /**
  11. * @var Inspekt_Cage
  12. * @access protected
  13. */
  14. protected $cage;
  15. /**
  16. * Sets up the fixture, for example, opens a network connection.
  17. * This method is called before a test is executed.
  18. *
  19. * @access protected
  20. */
  21. protected function setUp()
  22. {
  23. $inputarray['html'] = '<IMG """><SCRIPT>alert("XSS")</SCRIPT>">';
  24. $this->cage = Inspekt_Cage::Factory($inputarray);
  25. }
  26. /**
  27. * Tears down the fixture, for example, closes a network connection.
  28. * This method is called after a test is executed.
  29. *
  30. * @access protected
  31. */
  32. protected function tearDown()
  33. {
  34. }
  35. /**
  36. * @todo Implement testFactory().
  37. */
  38. public function testFactory()
  39. {
  40. // Remove the following lines when you implement this test.
  41. $this->markTestIncomplete(
  42. 'This test has not been implemented yet.'
  43. );
  44. }
  45. /**
  46. * @todo Implement testGetIterator().
  47. */
  48. public function testGetIterator()
  49. {
  50. // Remove the following lines when you implement this test.
  51. $this->markTestIncomplete(
  52. 'This test has not been implemented yet.'
  53. );
  54. }
  55. /**
  56. * @todo Implement testOffsetSet().
  57. */
  58. public function testOffsetSet()
  59. {
  60. // Remove the following lines when you implement this test.
  61. $this->markTestIncomplete(
  62. 'This test has not been implemented yet.'
  63. );
  64. }
  65. /**
  66. * @todo Implement testOffsetExists().
  67. */
  68. public function testOffsetExists()
  69. {
  70. // Remove the following lines when you implement this test.
  71. $this->markTestIncomplete(
  72. 'This test has not been implemented yet.'
  73. );
  74. }
  75. /**
  76. * @todo Implement testOffsetUnset().
  77. */
  78. public function testOffsetUnset()
  79. {
  80. // Remove the following lines when you implement this test.
  81. $this->markTestIncomplete(
  82. 'This test has not been implemented yet.'
  83. );
  84. }
  85. /**
  86. * @todo Implement testOffsetGet().
  87. */
  88. public function testOffsetGet()
  89. {
  90. // Remove the following lines when you implement this test.
  91. $this->markTestIncomplete(
  92. 'This test has not been implemented yet.'
  93. );
  94. }
  95. /**
  96. * @todo Implement testCount().
  97. */
  98. public function testCount()
  99. {
  100. // Remove the following lines when you implement this test.
  101. $this->markTestIncomplete(
  102. 'This test has not been implemented yet.'
  103. );
  104. }
  105. /**
  106. * @todo Implement testLoadHTMLPurifier().
  107. */
  108. public function testLoadHTMLPurifier()
  109. {
  110. // Remove the following lines when you implement this test.
  111. $this->markTestIncomplete(
  112. 'This test has not been implemented yet.'
  113. );
  114. }
  115. /**
  116. * @todo Implement testSetHTMLPurifier().
  117. */
  118. public function testSetHTMLPurifier()
  119. {
  120. // Remove the following lines when you implement this test.
  121. $this->markTestIncomplete(
  122. 'This test has not been implemented yet.'
  123. );
  124. }
  125. /**
  126. * @todo Implement testGetHTMLPurifier().
  127. */
  128. public function testGetHTMLPurifier()
  129. {
  130. // Remove the following lines when you implement this test.
  131. $this->markTestIncomplete(
  132. 'This test has not been implemented yet.'
  133. );
  134. }
  135. /**
  136. * @todo Implement test_parseAndApplyAutoFilters().
  137. */
  138. public function test_parseAndApplyAutoFilters()
  139. {
  140. // Remove the following lines when you implement this test.
  141. $this->markTestIncomplete(
  142. 'This test has not been implemented yet.'
  143. );
  144. }
  145. /**
  146. * @todo Implement test_applyAutoFilters().
  147. */
  148. public function test_applyAutoFilters()
  149. {
  150. // Remove the following lines when you implement this test.
  151. $this->markTestIncomplete(
  152. 'This test has not been implemented yet.'
  153. );
  154. }
  155. /**
  156. * @todo Implement test__call().
  157. */
  158. public function test__call()
  159. {
  160. // Remove the following lines when you implement this test.
  161. $this->markTestIncomplete(
  162. 'This test has not been implemented yet.'
  163. );
  164. }
  165. /**
  166. * @todo Implement testAddAccessor().
  167. */
  168. public function testAddAccessor()
  169. {
  170. // Remove the following lines when you implement this test.
  171. $this->markTestIncomplete(
  172. 'This test has not been implemented yet.'
  173. );
  174. }
  175. /**
  176. * @todo Implement testGetAlpha().
  177. */
  178. public function testGetAlpha()
  179. {
  180. // Remove the following lines when you implement this test.
  181. $this->markTestIncomplete(
  182. 'This test has not been implemented yet.'
  183. );
  184. }
  185. /**
  186. * @todo Implement testGetAlnum().
  187. */
  188. public function testGetAlnum()
  189. {
  190. // Remove the following lines when you implement this test.
  191. $this->markTestIncomplete(
  192. 'This test has not been implemented yet.'
  193. );
  194. }
  195. /**
  196. * @todo Implement testGetDigits().
  197. */
  198. public function testGetDigits()
  199. {
  200. // Remove the following lines when you implement this test.
  201. $this->markTestIncomplete(
  202. 'This test has not been implemented yet.'
  203. );
  204. }
  205. /**
  206. * @todo Implement testGetDir().
  207. */
  208. public function testGetDir()
  209. {
  210. // Remove the following lines when you implement this test.
  211. $this->markTestIncomplete(
  212. 'This test has not been implemented yet.'
  213. );
  214. }
  215. /**
  216. * @todo Implement testGetInt().
  217. */
  218. public function testGetInt()
  219. {
  220. // Remove the following lines when you implement this test.
  221. $this->markTestIncomplete(
  222. 'This test has not been implemented yet.'
  223. );
  224. }
  225. /**
  226. * @todo Implement testGetPath().
  227. */
  228. public function testGetPath()
  229. {
  230. // Remove the following lines when you implement this test.
  231. $this->markTestIncomplete(
  232. 'This test has not been implemented yet.'
  233. );
  234. }
  235. /**
  236. * @todo Implement testGetROT13().
  237. */
  238. public function testGetROT13()
  239. {
  240. // Remove the following lines when you implement this test.
  241. $this->markTestIncomplete(
  242. 'This test has not been implemented yet.'
  243. );
  244. }
  245. /**
  246. * @todo Implement testGetPurifiedHTML().
  247. */
  248. public function testGetPurifiedHTML()
  249. {
  250. // Remove the following lines when you implement this test.
  251. $this->markTestIncomplete(
  252. 'This test has not been implemented yet.'
  253. );
  254. }
  255. /**
  256. * @todo Implement testGetRaw().
  257. */
  258. public function testGetRaw()
  259. {
  260. // Remove the following lines when you implement this test.
  261. $this->markTestIncomplete(
  262. 'This test has not been implemented yet.'
  263. );
  264. }
  265. /**
  266. *
  267. */
  268. public function testTestAlnum()
  269. {
  270. $_POST = array();
  271. $_POST['b'] = '0';
  272. $cage_POST = Inspekt::makePostCage();
  273. $result = $cage_POST->testAlnum('b');
  274. $this->assertSame('0', $result);
  275. }
  276. /**
  277. *
  278. */
  279. public function testTestAlnum2()
  280. {
  281. $_POST = array();
  282. $_POST['b'] = '2009-12-25';
  283. $cage_POST = Inspekt::makePostCage();
  284. $result = $cage_POST->testGreaterThan('b', 25);
  285. $this->assertSame(FALSE, $result);
  286. }
  287. /**
  288. *
  289. */
  290. public function testTestAlnum3()
  291. {
  292. $_POST = array();
  293. $_POST['b'] = '0';
  294. $cage_POST = Inspekt::makePostCage();
  295. $result = $cage_POST->testLessThan('b', 25);
  296. $this->assertSame('0', $result);
  297. }
  298. /**
  299. * @todo Implement testTestAlpha().
  300. */
  301. public function testTestAlpha()
  302. {
  303. // Remove the following lines when you implement this test.
  304. $this->markTestIncomplete(
  305. 'This test has not been implemented yet.'
  306. );
  307. }
  308. /**
  309. * @todo Implement testTestBetween().
  310. */
  311. public function testTestBetween()
  312. {
  313. // Remove the following lines when you implement this test.
  314. $this->markTestIncomplete(
  315. 'This test has not been implemented yet.'
  316. );
  317. }
  318. /**
  319. * @todo Implement testTestCcnum().
  320. */
  321. public function testTestCcnum()
  322. {
  323. // Remove the following lines when you implement this test.
  324. $this->markTestIncomplete(
  325. 'This test has not been implemented yet.'
  326. );
  327. }
  328. /**
  329. * @todo Implement testTestDate().
  330. */
  331. public function testTestDate()
  332. {
  333. // Remove the following lines when you implement this test.
  334. $this->markTestIncomplete(
  335. 'This test has not been implemented yet.'
  336. );
  337. }
  338. /**
  339. * @todo Implement testTestDigits().
  340. */
  341. public function testTestDigits()
  342. {
  343. // Remove the following lines when you implement this test.
  344. $this->markTestIncomplete(
  345. 'This test has not been implemented yet.'
  346. );
  347. }
  348. /**
  349. * @todo Implement testTestEmail().
  350. */
  351. public function testTestEmail()
  352. {
  353. // Remove the following lines when you implement this test.
  354. $this->markTestIncomplete(
  355. 'This test has not been implemented yet.'
  356. );
  357. }
  358. /**
  359. * @todo Implement testTestFloat().
  360. */
  361. public function testTestFloat()
  362. {
  363. // Remove the following lines when you implement this test.
  364. $this->markTestIncomplete(
  365. 'This test has not been implemented yet.'
  366. );
  367. }
  368. /**
  369. * @todo Implement testTestGreaterThan().
  370. */
  371. public function testTestGreaterThan()
  372. {
  373. // Remove the following lines when you implement this test.
  374. $this->markTestIncomplete(
  375. 'This test has not been implemented yet.'
  376. );
  377. }
  378. /**
  379. * @todo Implement testTestHex().
  380. */
  381. public function testTestHex()
  382. {
  383. // Remove the following lines when you implement this test.
  384. $this->markTestIncomplete(
  385. 'This test has not been implemented yet.'
  386. );
  387. }
  388. /**
  389. * @todo Implement testTestHostname().
  390. */
  391. public function testTestHostname()
  392. {
  393. // Remove the following lines when you implement this test.
  394. $this->markTestIncomplete(
  395. 'This test has not been implemented yet.'
  396. );
  397. }
  398. /**
  399. * @todo Implement testTestInt().
  400. */
  401. public function testTestInt()
  402. {
  403. // Remove the following lines when you implement this test.
  404. $this->markTestIncomplete(
  405. 'This test has not been implemented yet.'
  406. );
  407. }
  408. /**
  409. * @todo Implement testTestIp().
  410. */
  411. public function testTestIp()
  412. {
  413. // Remove the following lines when you implement this test.
  414. $this->markTestIncomplete(
  415. 'This test has not been implemented yet.'
  416. );
  417. }
  418. /**
  419. * @todo Implement testTestLessThan().
  420. */
  421. public function testTestLessThan()
  422. {
  423. // Remove the following lines when you implement this test.
  424. $this->markTestIncomplete(
  425. 'This test has not been implemented yet.'
  426. );
  427. }
  428. /**
  429. * @todo Implement testTestOneOf().
  430. */
  431. public function testTestOneOf()
  432. {
  433. // Remove the following lines when you implement this test.
  434. $this->markTestIncomplete(
  435. 'This test has not been implemented yet.'
  436. );
  437. }
  438. /**
  439. * @todo Implement testTestPhone().
  440. */
  441. public function testTestPhone()
  442. {
  443. // Remove the following lines when you implement this test.
  444. $this->markTestIncomplete(
  445. 'This test has not been implemented yet.'
  446. );
  447. }
  448. /**
  449. * @todo Implement testTestRegex().
  450. */
  451. public function testTestRegex()
  452. {
  453. // Remove the following lines when you implement this test.
  454. $this->markTestIncomplete(
  455. 'This test has not been implemented yet.'
  456. );
  457. }
  458. /**
  459. * @todo Implement testTestUri().
  460. */
  461. public function testTestUri()
  462. {
  463. // Remove the following lines when you implement this test.
  464. $this->markTestIncomplete(
  465. 'This test has not been implemented yet.'
  466. );
  467. }
  468. /**
  469. * @todo Implement testTestZip().
  470. */
  471. public function testTestZip()
  472. {
  473. // Remove the following lines when you implement this test.
  474. $this->markTestIncomplete(
  475. 'This test has not been implemented yet.'
  476. );
  477. }
  478. /**
  479. * @todo Implement testNoTags().
  480. */
  481. public function testNoTags()
  482. {
  483. // Remove the following lines when you implement this test.
  484. $this->markTestIncomplete(
  485. 'This test has not been implemented yet.'
  486. );
  487. }
  488. /**
  489. * @todo Implement testNoPath().
  490. */
  491. public function testNoPath()
  492. {
  493. // Remove the following lines when you implement this test.
  494. $this->markTestIncomplete(
  495. 'This test has not been implemented yet.'
  496. );
  497. }
  498. /**
  499. * @todo Implement testNoTagsOrSpecial().
  500. */
  501. public function testNoTagsOrSpecial()
  502. {
  503. // Remove the following lines when you implement this test.
  504. $this->markTestIncomplete(
  505. 'This test has not been implemented yet.'
  506. );
  507. }
  508. /**
  509. * @todo Implement testEscMySQL().
  510. */
  511. public function testEscMySQL()
  512. {
  513. // Remove the following lines when you implement this test.
  514. $this->markTestIncomplete(
  515. 'This test has not been implemented yet.'
  516. );
  517. }
  518. /**
  519. * @todo Implement testEscPgSQL().
  520. */
  521. public function testEscPgSQL()
  522. {
  523. // Remove the following lines when you implement this test.
  524. $this->markTestIncomplete(
  525. 'This test has not been implemented yet.'
  526. );
  527. }
  528. /**
  529. * @todo Implement testEscPgSQLBytea().
  530. */
  531. public function testEscPgSQLBytea()
  532. {
  533. // Remove the following lines when you implement this test.
  534. $this->markTestIncomplete(
  535. 'This test has not been implemented yet.'
  536. );
  537. }
  538. /**
  539. * @todo Implement testKeyExists().
  540. */
  541. public function testKeyExists()
  542. {
  543. // Remove the following lines when you implement this test.
  544. $this->markTestIncomplete(
  545. 'This test has not been implemented yet.'
  546. );
  547. }
  548. /**
  549. * @todo Implement test_keyExistsRecursive().
  550. */
  551. public function test_keyExistsRecursive()
  552. {
  553. // Remove the following lines when you implement this test.
  554. $this->markTestIncomplete(
  555. 'This test has not been implemented yet.'
  556. );
  557. }
  558. /**
  559. * @todo Implement test_getValue().
  560. */
  561. public function test_getValue()
  562. {
  563. // Remove the following lines when you implement this test.
  564. $this->markTestIncomplete(
  565. 'This test has not been implemented yet.'
  566. );
  567. }
  568. /**
  569. * @todo Implement test_getValueRecursive().
  570. */
  571. public function test_getValueRecursive()
  572. {
  573. // Remove the following lines when you implement this test.
  574. $this->markTestIncomplete(
  575. 'This test has not been implemented yet.'
  576. );
  577. }
  578. /**
  579. * @todo Implement test_setValue().
  580. */
  581. public function test_setValue()
  582. {
  583. // Remove the following lines when you implement this test.
  584. $this->markTestIncomplete(
  585. 'This test has not been implemented yet.'
  586. );
  587. }
  588. /**
  589. * @todo Implement test_setValueRecursive().
  590. */
  591. public function test_setValueRecursive()
  592. {
  593. // Remove the following lines when you implement this test.
  594. $this->markTestIncomplete(
  595. 'This test has not been implemented yet.'
  596. );
  597. }
  598. }
  599. ?>