Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed tests setup

  • Loading branch information...
commit d0b95221f0add4968d29a67056a7dcc0252dbd5e 1 parent 8cb2101
William Durand authored
16  tests/EqualNestBehaviorTest.php
@@ -7,13 +7,27 @@ class EqualNestBehaviorTest extends TestCase
7 7
 {
8 8
     protected function setUp()
9 9
     {
10  
-        if (!class_exists('')) {
  10
+        if (!class_exists('Person')) {
11 11
             $schema = <<<XML
12 12
 <database name="equal_nest_behavior">
  13
+    <table name="person">
  14
+        <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
  15
+        <column name="name" type="VARCHAR" required="true" />
  16
+    </table>
  17
+
  18
+    <table name="friend">
  19
+        <behavior name="equal_nest">
  20
+            <parameter name="parent_table" value="person" />
  21
+        </behavior>
  22
+    </table>
13 23
 </database>
14 24
 XML;
15 25
         }
16 26
 
17 27
         $this->getBuilder($schema)->build();
18 28
     }
  29
+
  30
+    public function testObjectMethods()
  31
+    {
  32
+    }
19 33
 }
10  tests/TestCase.php
@@ -5,19 +5,11 @@
5 5
  */
6 6
 class TestCase extends \PHPUnit_Framework_TestCase
7 7
 {
8  
-    public function assertSQLContains($tablename, $options, $expected)
9  
-    {
10  
-        $schema  = $this->generateSchema($tablename, $options);
11  
-        $builder = $this->getBuilder($schema);
12  
-
13  
-        $this->assertContains($expected, $builder->getSQL());
14  
-    }
15  
-
16 8
     protected function getBuilder($schema)
17 9
     {
18 10
         $builder = new PropelQuickBuilder();
19 11
         $config  = $builder->getConfig();
20  
-        $config->setBuildProperty('behavior.publishable.class', __DIR__ . '/../src/EqualNestBehavior');
  12
+        $config->setBuildProperty('behavior.equal_nest.class', '../src/EqualNestBehavior');
21 13
 
22 14
         $builder->setConfig($config);
23 15
         $builder->setSchema($schema);
3  tests/bootstrap.php
... ...
@@ -1,7 +1,8 @@
1 1
 <?php
2 2
 
3 3
 $loader = require_once __DIR__ . '/../vendor/autoload.php';
4  
-$loader->add('', __DIR__ . '/../vendor/propel/propel1/generator/lib/util/PropelQuickBuilder.php');
5 4
 $loader->add('', __DIR__);
6 5
 
7 6
 set_include_path(__DIR__ . '/../vendor/phing/phing/classes' . PATH_SEPARATOR . get_include_path());
  7
+
  8
+require_once __DIR__ . '/../vendor/propel/propel1/generator/lib/util/PropelQuickBuilder.php';

0 notes on commit d0b9522

Please sign in to comment.
Something went wrong with that request. Please try again.