Skip to content

Commit de7f69d

Browse files
committed
Add phpunit and test case boostrap.
1 parent e1016b7 commit de7f69d

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
# react-mysql
22
Nuclear MySQL Reactor
3+
4+
5+
# Examples
6+
7+
Connection::init($loop);
8+
9+
Connection::query('SELECT * FROM `table` WHERE `column` = ? AND `column2` = ?;', ['red', 'white'])
10+
->then(function($result) { ... });
11+
12+
Connection::query returns a promise. This has all of the normal promise interface options.
13+
14+
# Credits
15+
Inspiration from:
16+
- https://github.com/kaja47/async-mysql
17+
- https://github.com/bixuehujin/reactphp-mysql

phpunit.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
bootstrap="tests/bootstrap.php">
11+
<testsuites>
12+
<testsuite name="ReactMysql Test Suite">
13+
<directory>./tests/</directory>
14+
</testsuite>
15+
</testsuites>
16+
<filter>
17+
<whitelist>
18+
<directory>./src/</directory>
19+
</whitelist>
20+
</filter>
21+
</phpunit>

tests/bootstrap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
require __DIR__.'/../vendor/autoload.php';

0 commit comments

Comments
 (0)