Fixes a bug in makeWorkDirectory where didn't create temp dir, modifies names of epub in epub tests, a=chris

Chris Pollett [2012-09-15 23:Sep:th]
Fixes a bug in makeWorkDirectory where didn't create temp dir, modifies names of epub in epub tests, a=chris
Filename
models/profile_model.php
tests/epub_processor_test.php
tests/test_files/TestandTextbookforyioop.epub
diff --git a/models/profile_model.php b/models/profile_model.php
index 2e9d0801a..c8ccf865b 100644
--- a/models/profile_model.php
+++ b/models/profile_model.php
@@ -83,7 +83,7 @@ class ProfileModel extends Model
             "$directory/cache", "$directory/data", "$directory/feeds",
             "$directory/locale", "$directory/log",
             "$directory/prepare", "$directory/schedules",
-            "$directory/search_filters");
+            "$directory/search_filters", "$directory/temp");
         $dir_status = array();
         foreach($to_make_dirs as $dir) {
             $dir_status[$dir] = $this->createIfNecessaryDirectory($dir);
diff --git a/tests/epub_processor_test.php b/tests/epub_processor_test.php
index 9806c8450..133ccab3d 100644
--- a/tests/epub_processor_test.php
+++ b/tests/epub_processor_test.php
@@ -73,10 +73,9 @@ class EpubProcessorTest extends UnitTest implements CrawlConstants
     public function setUp()
     {
         $epub_object = new EpubProcessor;
-        $url = "http://www.vijethpatil.com/TestandTextbookforyioop.epub";
-        $filename= BASE_DIR."/tests/test_files/TestandTextbookforyioop.epub";
-        $page = file_get_contents($filename);
-        $summary=$epub_object->process($page,$url);
+        $url = "http://www.yioop.com/TestEpubYioop.epub";
+        $filename= BASE_DIR."/tests/test_files/TestEpubYioop.epub";
+        $summary = $epub_object->process($page,$url);
         $this->test_objects['summary'] = $summary;
         $this->testEpubTitleTestCase();
         $this->testEpubLangTestCase();
@@ -101,7 +100,7 @@ class EpubProcessorTest extends UnitTest implements CrawlConstants
         $x = $m[self::TITLE];
         $correct_title = "The Test and Textbook for yioop";
         $description = "Test Passed with correct title";
-        $this->assertEqual($x,$correct_title,$description);
+        $this->assertEqual($x, $correct_title,$description);
     }

     /**
@@ -114,7 +113,7 @@ class EpubProcessorTest extends UnitTest implements CrawlConstants
         $x = $m[self::LANG];
         $correct_language = "en";
         $description = "Test Passed with correct Language";
-        $this->assertEqual($x,$correct_language,$description);
+        $this->assertEqual($x, $correct_language,$description);
     }

     /**
@@ -126,6 +125,6 @@ class EpubProcessorTest extends UnitTest implements CrawlConstants
         $m = $this->test_objects['summary'] ;
         $x = $m[self::DESCRIPTION];
         $description = "Test Passed with Description information not empty";
-        $this->assertTrue($x,$description);
+        $this->assertTrue($x, $description);
     }
 }
diff --git a/tests/test_files/TestandTextbookforyioop.epub b/tests/test_files/TestandTextbookforyioop.epub
deleted file mode 100644
index 2c890fec5..000000000
Binary files a/tests/test_files/TestandTextbookforyioop.epub and /dev/null differ
ViewGit