Beispiel #1
0
 public function setUp()
 {
     $this->application = Atrox_Core_Application::getInstance(Mock_Application::getInstance());
     $this->application->getConnection()->connect();
     $this->application->createBlogTable();
     $this->application->createBlogCommentTable();
 }
 public function setUp()
 {
     $this->application = Atrox_Core_Application::getInstance(Mock_Application::getInstance());
     $this->application->getConnection()->connect();
     $this->application->setCache($cache = new Atrox_Core_Caching_Memcached());
     $cache->addServer("localhost");
     $this->application->createBlogTable();
     $this->application->createBlogCommentTable();
 }
Beispiel #3
0
 public function setUp()
 {
     // testdatabase - This should be defined in you hosts file
     $this->validConnectionString = "host=testdatabase port=5432 dbname=AtroxTest user=WebUser password=test";
     $this->application = Atrox_Core_Application::getInstance(Mock_Application::getInstance());
     $this->application->setConnection(new Atrox_Core_Data_PostgreSql_Connection($this->validConnectionString));
     $this->application->getConnection()->connect();
     $this->application->setLogPath(realpath("../../../../../Log"));
     $this->application->createBlogTable();
 }
    public function setUp()
    {
        $this->application = Atrox_Core_Application::getInstance(Mock_Application::getInstance());
        $this->application->getConnection()->connect();
        $sql = <<<SQL
CREATE TEMPORARY TABLE "TestMember" (
    "Id" serial NOT NULL,
    "EmailAddress" text NOT NULL,
    "Password" text NOT NULL,
    "Token" text
);
SQL;
        $this->application->getConnection()->query($sql);
    }
Beispiel #5
0
    public function setUp()
    {
        $this->application = Atrox_Core_Application::getInstance(Mock_Application::getInstance());
        $this->application->getConnection()->connect();
        $this->application->createBlogTable();
        $sql = <<<SQL
\t\t\tINSERT INTO "TempBlog" ("Title", "Description", "DateCreated") VALUES ('First Blog Entry', 'I love blogging', '2008-05-22 17:15:33.460379');
SQL;
        $this->application->getConnection()->query($sql);
        $sql = <<<SQL
\t\t\tINSERT INTO "TempBlog" ("Title", "Description", "DateCreated") VALUES ('I am a bog', 'A test blog for the featured member section.', '2008-05-28 17:51:24.943435');
SQL;
        $this->application->getConnection()->query($sql);
        $sql = <<<SQL
\t\t\tINSERT INTO "TempBlog" ("Title", "Description", "DateCreated") VALUES ('A new blog entry', 'This is a blog description', '2008-06-20 12:44:56.752169');
SQL;
        $this->application->getConnection()->query($sql);
    }
Beispiel #6
0
 public function testCheckSingleton()
 {
     $application1 = Atrox_Core_Application::getInstance(Mock_Application::getInstance());
     $application2 = Atrox_Core_Application::getInstance();
     $this->assertEquals($application1, $application2);
 }