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
 ```
569
 ```
570
 $ wget https://phar.phpunit.de/phpunit.phar
570
 $ wget https://phar.phpunit.de/phpunit.phar
571
 $ php phpunit.phar tests/tests.php
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
 ```
602
 ```
603
 $ wget https://phar.phpunit.de/phpunit.phar
603
 $ wget https://phar.phpunit.de/phpunit.phar
604
 $ php phpunit.phar tests/tests.php
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
 SET check_function_bodies = false;
9
 SET check_function_bodies = false;
10
 SET client_min_messages = warning;
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
 SET search_path = public, pg_catalog;
12
 SET search_path = public, pg_catalog;
25
 
13
 
26
 SET default_tablespace = '';
14
 SET default_tablespace = '';
51
 );
37
 );
52
 
38
 
53
 
39
 
54
-ALTER TABLE public.categories OWNER TO postgres;
55
-
56
 --
40
 --
57
 -- Name: comments; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
41
 -- Name: comments; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
58
 --
42
 --
64
 );
48
 );
65
 
49
 
66
 
50
 
67
-ALTER TABLE public.comments OWNER TO postgres;
68
-
69
 --
51
 --
70
 -- Name: post_tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
52
 -- Name: post_tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
71
 --
53
 --
77
 );
59
 );
78
 
60
 
79
 
61
 
80
-ALTER TABLE public.post_tags OWNER TO postgres;
81
-
82
 --
62
 --
83
 -- Name: posts; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
63
 -- Name: posts; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
84
 --
64
 --
91
 );
71
 );
92
 
72
 
93
 
73
 
94
-ALTER TABLE public.posts OWNER TO postgres;
95
-
96
 --
74
 --
97
 -- Name: tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
75
 -- Name: tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
98
 --
76
 --
103
 );
81
 );
104
 
82
 
105
 
83
 
106
-ALTER TABLE public.tags OWNER TO postgres;
107
-
108
 --
84
 --
109
 -- Name: users; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
85
 -- Name: users; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
110
 --
86
 --
116
 );
92
 );
117
 
93
 
118
 
94
 
119
-ALTER TABLE public.users OWNER TO postgres;
120
-
121
 --
95
 --
122
 -- Data for Name: categories; Type: TABLE DATA; Schema: public; Owner: postgres
96
 -- Data for Name: categories; Type: TABLE DATA; Schema: public; Owner: postgres
123
 --
97
 --
301
     ADD CONSTRAINT posts_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
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
 -- PostgreSQL database dump complete
279
 -- PostgreSQL database dump complete
315
 --
280
 --
316
-

Loading…
Cancel
Save