gtErrorTestCaseMethodTest.php 699 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. require_once 'PHPUnit/Framework.php';
  3. require_once dirname(__FILE__) . '/../src/gtAutoload.php';
  4. class gtErrorTestCaseMethodTest 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 = gtErrorTestCase::getInstance($optSect,'method');
  14. $btc->setMethod($f);
  15. $btc->constructTestCase();
  16. $fs = $btc->toString();
  17. $this->assertTrue(is_string($fs));
  18. }
  19. }
  20. ?>