Author: ornicar2
Date: 2010-02-11 00:57:17 +0100 (Thu, 11 Feb 2010)
New Revision: 27872

Added:
   
plugins/diemPlugin/trunk/dmCorePlugin/test/project/test/unit/dmProjectEnableMailerTest.php
Modified:
   plugins/diemPlugin/trunk/dmCorePlugin/test/project/config/dm/config.yml
Log:
[Diem]
- added unit tests for Swift mailer enabling

Modified: 
plugins/diemPlugin/trunk/dmCorePlugin/test/project/config/dm/config.yml
===================================================================
--- plugins/diemPlugin/trunk/dmCorePlugin/test/project/config/dm/config.yml     
2010-02-10 23:53:58 UTC (rev 27871)
+++ plugins/diemPlugin/trunk/dmCorePlugin/test/project/config/dm/config.yml     
2010-02-10 23:57:17 UTC (rev 27872)
@@ -19,4 +19,7 @@
     identifier_fields:    [ name, title, subject, author, id ]   # Fields used 
to represent a record with a string
     cache_enabled:        true          # (RECOMMENDED) Use doctrine query 
cache. No side effect, automatic cache invalidation )
     cache_result_enabled: false         # Use doctrine result cache when 
query->dmCache() is called
-    cache_result_enabled_default: false # Use doctrine result cache on every 
query ( performance gain, possible issues )
\ No newline at end of file
+    cache_result_enabled_default: false # Use doctrine result cache on every 
query ( performance gain, possible issues )
+
+  performance:
+    enable_mailer:        false
\ No newline at end of file

Added: 
plugins/diemPlugin/trunk/dmCorePlugin/test/project/test/unit/dmProjectEnableMailerTest.php
===================================================================
--- 
plugins/diemPlugin/trunk/dmCorePlugin/test/project/test/unit/dmProjectEnableMailerTest.php
                          (rev 0)
+++ 
plugins/diemPlugin/trunk/dmCorePlugin/test/project/test/unit/dmProjectEnableMailerTest.php
  2010-02-10 23:57:17 UTC (rev 27872)
@@ -0,0 +1,14 @@
+<?php
+
+require_once(realpath(dirname(__FILE__).'/../../..').'/unit/helper/dmUnitTestHelper.php');
+$helper = new dmUnitTestHelper();
+$helper->boot();
+
+$t = new lime_test();
+
+$t->ok(!class_exists('Swift_Message'), 'Swift_Message class does not exist');
+
+$t->info('Enable mailer');
+dm::enableMailer();
+
+$t->ok(class_exists('Swift_Message'), 'Swift_Message class now exists');
\ No newline at end of file

-- 
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