Browse Source

Refactor database drivers

Maurits van der Schee 8 years ago
parent
commit
c8baf8d54b
2 changed files with 8 additions and 42 deletions
  1. 8
    8
      README.md
  2. 0
    34
      tests/blog_postgresql.sql

+ 8
- 8
README.md View File

@@ -569,13 +569,13 @@ There are PHPUnit tests in the file 'tests.php'. You need to configure your test
569 569
 ```
570 570
 $ wget https://phar.phpunit.de/phpunit.phar
571 571
 $ php phpunit.phar tests/tests.php
572
-PHPUnit 4.7.3 by Sebastian Bergmann and contributors.
572
+PHPUnit 5.1.3 by Sebastian Bergmann and contributors.
573 573
 
574
-...................
574
+.....................................                             37 / 37 (100%)
575 575
 
576
-Time: 464 ms, Memory: 12.00Mb
576
+Time: 433 ms, Memory: 11.00Mb
577 577
 
578
-OK (19 tests, 39 assertions)
578
+OK (37 tests, 61 assertions)
579 579
 $
580 580
 ```
581 581
 
@@ -602,13 +602,13 @@ NB: You MUST use an empty database as a desctructive database fixture ('blog_sql
602 602
 ```
603 603
 $ wget https://phar.phpunit.de/phpunit.phar
604 604
 $ php phpunit.phar tests/tests.php
605
-PHPUnit 4.7.3 by Sebastian Bergmann and contributors.
605
+PHPUnit 5.1.3 by Sebastian Bergmann and contributors.
606 606
 
607
-......................
607
+.....................................                             37 / 37 (100%)
608 608
 
609
-Time: 894 ms, Memory: 2.75Mb
609
+Time: 856 ms, Memory: 11.25Mb
610 610
 
611
-OK (22 tests, 42 assertions)
611
+OK (37 tests, 61 assertions)
612 612
 $
613 613
 ```
614 614
 

+ 0
- 34
tests/blog_postgresql.sql View File

@@ -9,20 +9,6 @@ SET standard_conforming_strings = on;
9 9
 SET check_function_bodies = false;
10 10
 SET client_min_messages = warning;
11 11
 
12
---
13
---
14
-
15
-CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
16
-
17
-
18
---
19
---
20
-
21
-COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
22
-
23
-
24 12
 SET search_path = public, pg_catalog;
25 13
 
26 14
 SET default_tablespace = '';
@@ -51,8 +37,6 @@ CREATE TABLE categories (
51 37
 );
52 38
 
53 39
 
54
-ALTER TABLE public.categories OWNER TO postgres;
55
-
56 40
 --
57 41
 -- Name: comments; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
58 42
 --
@@ -64,8 +48,6 @@ CREATE TABLE comments (
64 48
 );
65 49
 
66 50
 
67
-ALTER TABLE public.comments OWNER TO postgres;
68
-
69 51
 --
70 52
 -- Name: post_tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
71 53
 --
@@ -77,8 +59,6 @@ CREATE TABLE post_tags (
77 59
 );
78 60
 
79 61
 
80
-ALTER TABLE public.post_tags OWNER TO postgres;
81
-
82 62
 --
83 63
 -- Name: posts; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
84 64
 --
@@ -91,8 +71,6 @@ CREATE TABLE posts (
91 71
 );
92 72
 
93 73
 
94
-ALTER TABLE public.posts OWNER TO postgres;
95
-
96 74
 --
97 75
 -- Name: tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
98 76
 --
@@ -103,8 +81,6 @@ CREATE TABLE tags (
103 81
 );
104 82
 
105 83
 
106
-ALTER TABLE public.tags OWNER TO postgres;
107
-
108 84
 --
109 85
 -- Name: users; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
110 86
 --
@@ -116,8 +92,6 @@ CREATE TABLE users (
116 92
 );
117 93
 
118 94
 
119
-ALTER TABLE public.users OWNER TO postgres;
120
-
121 95
 --
122 96
 -- Data for Name: categories; Type: TABLE DATA; Schema: public; Owner: postgres
123 97
 --
@@ -301,17 +275,6 @@ ALTER TABLE ONLY posts
301 275
     ADD CONSTRAINT posts_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
302 276
 
303 277
 
304
---
305
---
306
-
307
-REVOKE ALL ON SCHEMA public FROM PUBLIC;
308
-REVOKE ALL ON SCHEMA public FROM postgres;
309
-GRANT ALL ON SCHEMA public TO postgres;
310
-GRANT ALL ON SCHEMA public TO PUBLIC;
311
-
312
-
313 278
 --
314 279
 -- PostgreSQL database dump complete
315 280
 --
316
-

Loading…
Cancel
Save