summaryrefslogtreecommitdiff
path: root/tests/unit/Data/SqlMap/StatementExtendsTest.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2016-03-25 17:55:51 +0100
committerFabio Bas <ctrlaltca@gmail.com>2016-03-25 17:55:51 +0100
commita3388622287e218beddfa14a47ed677d4307b36b (patch)
tree1b4c7ac8597b1cc798b6683d4a81c90d38de12f6 /tests/unit/Data/SqlMap/StatementExtendsTest.php
parentc7fd3e1167b6f2fa7746edbd0fb8f8c1694c61f9 (diff)
Removed simpletest and moved all tests in the unit tree
Tests are executed now, but a lot of them need fixing.
Diffstat (limited to 'tests/unit/Data/SqlMap/StatementExtendsTest.php')
-rw-r--r--tests/unit/Data/SqlMap/StatementExtendsTest.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/unit/Data/SqlMap/StatementExtendsTest.php b/tests/unit/Data/SqlMap/StatementExtendsTest.php
new file mode 100644
index 00000000..15d00e39
--- /dev/null
+++ b/tests/unit/Data/SqlMap/StatementExtendsTest.php
@@ -0,0 +1,31 @@
+<?php
+
+Prado::using('System.Data.SqlMap.TSqlMapConfig');
+
+/**
+ * @package System.Data.SqlMap
+ */
+class StatementExtendsTest extends PHPUnit_Framework_TestCase
+{
+ protected $sqlmap;
+
+ function setup()
+ {
+ $config = new TSqlMapConfig();
+ $config->ConfigFile = dirname(__FILE__).'/maps/tests.xml';
+ $this->sqlmap = $config->getClient();
+ }
+
+ function test_extends1()
+ {
+ $manager = $this->sqlmap->SqlMapManager;
+ $sql = $manager->getMappedStatement('test')->getSqlString();
+
+ $this->assertPattern('/img_request/', $sql);
+ $this->assertNoPattern('/img_progress/', $sql);
+
+ $sql2 = $manager->getMappedStatement('GetAllProgress')->getSqlString();
+ $this->assertPattern('/img_request/', $sql2);
+ $this->assertPattern('/img_progress/', $sql2);
+ }
+}