EncodingShellTest.php 835 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. App::uses('EncodingShell', 'Tools.Console/Command');
  3. App::uses('MyCakeTestCase', 'Tools.TestSuite');
  4. class EncodingShellTest extends MyCakeTestCase {
  5. public $EncodingShell;
  6. public function setUp() {
  7. parent::setUp();
  8. $this->EncodingShell = new EncodingShell();
  9. $this->EncodingShell->initialize();
  10. $this->EncodingShell->startup();
  11. }
  12. public function testObject() {
  13. $this->assertTrue(is_object($this->EncodingShell));
  14. $this->assertInstanceOf('EncodingShell', $this->EncodingShell);
  15. }
  16. public function testFolder() {
  17. $this->EncodingShell->params['ext'] = '';
  18. $this->EncodingShell->params['verbose'] = false;
  19. $this->EncodingShell->args[] = dirname(__FILE__);
  20. $this->EncodingShell->folder();
  21. }
  22. }
  23. class TestEncodingShell extends EncodingShell {
  24. public function found() {
  25. return $this->_found;
  26. }
  27. }