Changeset 4075

Show
Ignore:
Timestamp:
03/22/08 00:51:36 (16 months ago)
Author:
jwage
Message:

fixes #837 - added tests to cover this

Location:
branches/0.10/tests
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • branches/0.10/tests/MigrationTestCase.php

    r3884 r4075  
    5252        $this->assertEqual($migration->getCurrentVersion(), 0); 
    5353    } 
     54     
     55    public function testMigrationClassNameInflected() 
     56    { 
     57        $tests = array('test-class-Name', 
     58                       'test_class_name', 
     59                       'TestClassName', 
     60                       'test:class:name', 
     61                       'test(class)name', 
     62                       'test*class*name', 
     63                       'test class name', 
     64                       'test&class&name'); 
     65 
     66        $builder = new Doctrine_Migration_Builder(); 
     67 
     68        foreach ($tests as $test) { 
     69            $code = $builder->generateMigrationClass($test); 
     70            $this->assertTrue(strpos($code, 'TestClassName')); 
     71        } 
     72    } 
    5473} 
  • branches/0.10/tests/run.php

    r4066 r4075  
    174174$behaviors->addTestCase(new Doctrine_View_TestCase()); 
    175175$behaviors->addTestCase(new Doctrine_AuditLog_TestCase()); 
    176 $behaviors->addTestCase(new Doctrine_Validator_TestCase()); 
    177 $behaviors->addTestCase(new Doctrine_Validator_Future_TestCase()); 
    178 $behaviors->addTestCase(new Doctrine_Validator_Past_TestCase()); 
    179176$behaviors->addTestCase(new Doctrine_Hook_TestCase()); 
    180177$behaviors->addTestCase(new Doctrine_I18n_TestCase()); 
    181178$behaviors->addTestCase(new Doctrine_Sluggable_TestCase()); 
     179$behaviors->addTestCase(new Doctrine_Record_Generator_TestCase()); 
    182180$test->addTestCase($behaviors); 
     181 
     182// Validator Testing 
     183$validators = new GroupTest('Vavlidators Testing', 'validators'); 
     184$validators->addTestCase(new Doctrine_Validator_TestCase()); 
     185$validators->addTestCase(new Doctrine_Validator_Future_TestCase()); 
     186$validators->addTestCase(new Doctrine_Validator_Past_TestCase()); 
     187$test->addTestCase($validators); 
    183188 
    184189// Db Tests