gtBasicTestCaseMethodTest.php 695 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. require_once 'PHPUnit/Framework.php';
  3. require_once dirname(__FILE__) . '/../src/gtAutoload.php';
  4. class gtBasicTestCaseMethodTest extends PHPUnit_Framework_TestCase {
  5. public function testTestCase() {
  6. $f = new gtMethod('DOMDocument','createAttribute');
  7. $f->setArgumentNames();
  8. $f->setArgumentLists();
  9. $f->setInitialisationStatements();
  10. $f->setConstructorArgumentNames();
  11. $f->setConstructorInitStatements();
  12. $optSect = new gtOptionalSections();
  13. $btc = gtBasicTestCaseMethod::getInstance($optSect, 'method');
  14. $btc->setMethod($f);
  15. $btc->constructTestCase();
  16. $fs = $btc->toString();
  17. $this->assertTrue(is_string($fs));
  18. }
  19. }
  20. ?>