summaryrefslogtreecommitdiff
path: root/tests/unit/Testing/Data/Analysis/TDbStatementAnalysisTest.php
diff options
context:
space:
mode:
authorctrlaltca <>2013-01-02 14:42:24 +0000
committerctrlaltca <>2013-01-02 14:42:24 +0000
commitedf2251aca60a970e822079d23933e5b70b26571 (patch)
tree366b6688efbb03f20f47268bea57859cea673c70 /tests/unit/Testing/Data/Analysis/TDbStatementAnalysisTest.php
parent8e5f2510bd577e15095e46afc7d0ba6808549bf8 (diff)
backported all related changes up to 3229 to branch/3.2
Diffstat (limited to 'tests/unit/Testing/Data/Analysis/TDbStatementAnalysisTest.php')
-rw-r--r--tests/unit/Testing/Data/Analysis/TDbStatementAnalysisTest.php62
1 files changed, 0 insertions, 62 deletions
diff --git a/tests/unit/Testing/Data/Analysis/TDbStatementAnalysisTest.php b/tests/unit/Testing/Data/Analysis/TDbStatementAnalysisTest.php
deleted file mode 100644
index 70437816..00000000
--- a/tests/unit/Testing/Data/Analysis/TDbStatementAnalysisTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
-
-Prado::using('System.Testing.Data.Analysis.TDbStatementAnalysis');
-
-/**
- * @package System.Testing.Data.Analysis
- */
-class TDbStatementAnalysisTest extends PHPUnit_Framework_TestCase
-{
- private $analyser;
-
- public function setUp()
- {
- $this->analyser = new TDbStatementAnalysis();
- }
-
- public function tearDown()
- {
- $this->analyser = null;
- }
-
- public function testStaticClassificationAnalysis()
- {
- $parameter = new TDbStatementAnalysisParameter();
- self::assertEquals(TDbStatementClassification::UNKNOWN, TDbStatementAnalysis::doClassificationAnalysis($parameter));
-
- $parameter = new TDbStatementAnalysisParameter('SELECT 1');
- self::assertEquals(TDbStatementClassification::UNKNOWN, TDbStatementAnalysis::doClassificationAnalysis($parameter));
-
- $parameter = new TDbStatementAnalysisParameter('SELECT 1', TDbStatementClassification::SQL);
- self::assertEquals(TDbStatementClassification::SQL, TDbStatementAnalysis::doClassificationAnalysis($parameter));
- }
-
- public function testDriverName()
- {
- self::assertNull($this->analyser->getDriverName());
-
- $this->analyser->setDriverName('mysql');
- self::assertEquals('mysql', $this->analyser->getDriverName());
-
- $this->analyser->setDriverName('mssql');
- self::assertEquals('mssql', $this->analyser->getDriverName());
-
- $this->analyser->setDriverName(null);
- self::assertNull($this->analyser->getDriverName());
- }
-
- public function testClassificationAnalysis()
- {
- $parameter = new TDbStatementAnalysisParameter();
- self::assertEquals(TDbStatementClassification::UNKNOWN, $this->analyser->getClassificationAnalysis($parameter));
-
- $parameter = new TDbStatementAnalysisParameter('SELECT 1');
- self::assertEquals(TDbStatementClassification::UNKNOWN, $this->analyser->getClassificationAnalysis($parameter));
-
- $parameter = new TDbStatementAnalysisParameter('SELECT 1', TDbStatementClassification::SQL);
- self::assertEquals(TDbStatementClassification::SQL, $this->analyser->getClassificationAnalysis($parameter));
- }
-
-}
-?> \ No newline at end of file