Author: caefer
Date: 2010-04-06 22:24:39 +0200 (Tue, 06 Apr 2010)
New Revision: 29020

Added:
   plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestObject.php
   plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestPeer.php
   plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/
   
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/TestRecord.php
   
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/TestTable.php
Removed:
   plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestRecord.php
Modified:
   
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/routing/sfImageTransformRouteTest.php
   
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/source/sfImageSourceDoctrineTest.php
   
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/source/sfImageSourcePropelTest.php
Log:

 * added propel mock classes
 * moved doctrine mock classes to correct structure



Added: 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestObject.php
===================================================================
--- 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestObject.php    
                            (rev 0)
+++ 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestObject.php    
    2010-04-06 20:24:39 UTC (rev 29020)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * This file is part of the sfImageTransformExtraPlugin unit tests package.
+ * (c) 2010 Christian Schaefer <[email protected]>>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package    sfImageTransformExtraPluginUnitTests
+ * @author     Christian Schaefer <[email protected]>
+ * @version    SVN: $Id: sfRawFileCache.class.php 63 2010-03-09 04:34:28Z 
caefer $
+ */
+
+/* require Peer class */
+require_once(dirname(__FILE__).'/TestPeer.php');
+
+/**
+ * Mocked Propel record to use in tests
+ *
+ * @package    sfImageTransformExtraPluginUnitTests
+ * @subpackage Object
+ * @author     Christian Schaefer <[email protected]>
+ */
+class TestObject
+{
+  public function getId()
+  {
+    return 1;
+  }
+
+  public function getFile()
+  {
+    return 'daphne.jpg';
+  }
+}

Added: 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestPeer.php
===================================================================
--- plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestPeer.php  
                        (rev 0)
+++ plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestPeer.php  
2010-04-06 20:24:39 UTC (rev 29020)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * This file is part of the sfImageTransformExtraPlugin unit tests package.
+ * (c) 2010 Christian Schaefer <[email protected]>>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package    sfImageTransformExtraPluginUnitTests
+ * @author     Christian Schaefer <[email protected]>
+ * @version    SVN: $Id: sfRawFileCache.class.php 63 2010-03-09 04:34:28Z 
caefer $
+ */
+
+/**
+ * Mocked Propel table to use in tests
+ *
+ * @package    sfImageTransformExtraPluginUnitTests
+ * @subpackage Peer
+ * @author     Christian Schaefer <[email protected]>
+ */
+class TestPeer
+{
+  public static function retrieveByPK($pk)
+  {
+    switch ($pk)
+    {
+      case 1:
+        return new TestObject();
+      default:
+        return null;
+    }
+  }
+}

Deleted: 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestRecord.php
===================================================================
--- 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestRecord.php    
    2010-04-06 20:19:56 UTC (rev 29019)
+++ 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestRecord.php    
    2010-04-06 20:24:39 UTC (rev 29020)
@@ -1,58 +0,0 @@
-<?php
-/**
- * This file is part of the sfImageTransformExtraPlugin unit tests package.
- * (c) 2010 Christian Schaefer <[email protected]>>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- *
- * @package    sfImageTransformExtraPluginUnitTests
- * @author     Christian Schaefer <[email protected]>
- * @version    SVN: $Id: sfRawFileCache.class.php 63 2010-03-09 04:34:28Z 
caefer $
- */
-
-/**
- * Mocked Doctrine record to use in tests
- *
- * @package    sfImageTransformExtraPluginUnitTests
- * @subpackage Record
- * @author     Christian Schaefer <[email protected]>
- */
-class TestRecord extends Doctrine_Record
-{
-  public function getTestAttribute()
-  {
-    return 'test-me';
-  }
-
-  public function getId()
-  {
-    return 1;
-  }
-
-  public function getFile()
-  {
-    return 'daphne.jpg';
-  }
-}
-
-/**
- * Mocked Doctrine table to use in tests
- *
- * @package    sfImageTransformExtraPluginUnitTests
- * @subpackage Table
- * @author     Christian Schaefer <[email protected]>
- */
-class TestRecordTable extends Doctrine_Table
-{
-  public function find($id)
-  {
-    switch ($id)
-    {
-      case 1:
-        return new TestRecord();
-      default:
-        return null;
-    }
-  }
-}

Copied: 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/TestRecord.php
 (from rev 28986, 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestRecord.php)
===================================================================
--- 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/TestRecord.php
                               (rev 0)
+++ 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/TestRecord.php
       2010-04-06 20:24:39 UTC (rev 29020)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * This file is part of the sfImageTransformExtraPlugin unit tests package.
+ * (c) 2010 Christian Schaefer <[email protected]>>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package    sfImageTransformExtraPluginUnitTests
+ * @author     Christian Schaefer <[email protected]>
+ * @version    SVN: $Id: sfRawFileCache.class.php 63 2010-03-09 04:34:28Z 
caefer $
+ */
+
+/* require Table class */
+require_once(dirname(__FILE__).'/TestTable.php');
+
+/**
+ * Mocked Doctrine record to use in tests
+ *
+ * @package    sfImageTransformExtraPluginUnitTests
+ * @subpackage Record
+ * @author     Christian Schaefer <[email protected]>
+ */
+class TestRecord extends Doctrine_Record
+{
+  public function getId()
+  {
+    return 1;
+  }
+
+  public function getFile()
+  {
+    return 'daphne.jpg';
+  }
+}

Copied: 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/TestTable.php
 (from rev 28986, 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/TestRecord.php)
===================================================================
--- 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/TestTable.php
                                (rev 0)
+++ 
plugins/sfImageTransformExtraPlugin/trunk/test/fixtures/model/doctrine/TestTable.php
        2010-04-06 20:24:39 UTC (rev 29020)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * This file is part of the sfImageTransformExtraPlugin unit tests package.
+ * (c) 2010 Christian Schaefer <[email protected]>>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package    sfImageTransformExtraPluginUnitTests
+ * @author     Christian Schaefer <[email protected]>
+ * @version    SVN: $Id: sfRawFileCache.class.php 63 2010-03-09 04:34:28Z 
caefer $
+ */
+
+/**
+ * Mocked Doctrine table to use in tests
+ *
+ * @package    sfImageTransformExtraPluginUnitTests
+ * @subpackage Table
+ * @author     Christian Schaefer <[email protected]>
+ */
+class TestRecordTable extends Doctrine_Table
+{
+  public function find($id)
+  {
+    switch ($id)
+    {
+      case 1:
+        return new TestRecord();
+      default:
+        return null;
+    }
+  }
+}

Modified: 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/routing/sfImageTransformRouteTest.php
===================================================================
--- 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/routing/sfImageTransformRouteTest.php
       2010-04-06 20:19:56 UTC (rev 29019)
+++ 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/routing/sfImageTransformRouteTest.php
       2010-04-06 20:24:39 UTC (rev 29020)
@@ -14,7 +14,9 @@
 /** central bootstrap for unit tests */
 require_once dirname(__FILE__).'/../../../bootstrap/unit.php';
 /** Doctrine test record for mocking */
-require_once dirname(__FILE__).'/../../../fixtures/model/TestRecord.php';
+require_once 
dirname(__FILE__).'/../../../fixtures/model/doctrine/TestRecord.php';
+/** Propel test record for mocking */
+require_once dirname(__FILE__).'/../../../fixtures/model/TestObject.php';
 /** PHPUnit Framework */
 require_once 'PHPUnit/Framework.php';
 

Modified: 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/source/sfImageSourceDoctrineTest.php
===================================================================
--- 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/source/sfImageSourceDoctrineTest.php
        2010-04-06 20:19:56 UTC (rev 29019)
+++ 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/source/sfImageSourceDoctrineTest.php
        2010-04-06 20:24:39 UTC (rev 29020)
@@ -14,7 +14,7 @@
 /** central bootstrap for unit tests */
 require_once dirname(__FILE__).'/../../../bootstrap/unit.php';
 /** Doctrine test record for mocking */
-require_once dirname(__FILE__).'/../../../fixtures/model/TestRecord.php';
+require_once 
dirname(__FILE__).'/../../../fixtures/model/doctrine/TestRecord.php';
 /** PHPUnit Framework */
 require_once 'PHPUnit/Framework.php';
 

Modified: 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/source/sfImageSourcePropelTest.php
===================================================================
--- 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/source/sfImageSourcePropelTest.php
  2010-04-06 20:19:56 UTC (rev 29019)
+++ 
plugins/sfImageTransformExtraPlugin/trunk/test/unit/lib/source/sfImageSourcePropelTest.php
  2010-04-06 20:24:39 UTC (rev 29020)
@@ -13,6 +13,8 @@
 
 /** central bootstrap for unit tests */
 require_once dirname(__FILE__).'/../../../bootstrap/unit.php';
+/** Propel test record for mocking */
+require_once dirname(__FILE__).'/../../../fixtures/model/TestObject.php';
 /** PHPUnit Framework */
 require_once 'PHPUnit/Framework.php';
 
@@ -27,7 +29,7 @@
 {
   private $testSourceUri = null;
   private $testParameters = array(
-    'type' => 'TestRecord',
+    'type' => 'TestObject',
     'attribute' => 'file',
     'id' => '1'
   );

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to