Skip to content

Commit 60a25fe

Browse files
committed
- Removed jimbojsb/pseudo since it kept reporting errors @ travis
1 parent 2d9c63f commit 60a25fe

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
}],
99
"require": {
1010
"php": ">= 5.4",
11+
"ext-pdo": "*",
12+
"ext-spl": "*",
1113
"psr/log": "~1"
1214
},
1315
"require-dev": {
1416
"phpunit/phpunit": "~4.0",
1517
"phake/phake": "1.0.5",
16-
"jimbojsb/pseudo": "dev-master"
18+
"rkr/fakepdo": "0.1"
1719
},
1820
"autoload": {
1921
"psr-4": {

tests.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<phpunit bootstrap="vendor/autoload.php"
22
backupGlobals="false"
33
backupStaticAttributes="false"
4-
strict="true"
54
verbose="true"
65
timeoutForSmallTests="5">
76
<testsuites>

tests/Databases/MySQLTest.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php
22
namespace Kir\MySQL\Databases;
33

4-
use Pseudo\Pdo;
4+
use Kir\FakePDO\EventHandlers\RegistryEventHandler;
5+
use Kir\FakePDO\FakePDO;
56

67
class MySQLTest extends \PHPUnit_Framework_TestCase {
78
private $errorLvl;
@@ -16,7 +17,7 @@ protected function tearDown() {
1617
}
1718

1819
public function testTransactionTries1() {
19-
$pdo = new Pdo();
20+
$pdo = new FakePDO();
2021
$mysql = new MySQL($pdo);
2122

2223
$this->setExpectedException('Exception', '5');
@@ -29,7 +30,7 @@ public function testTransactionTries1() {
2930
}
3031

3132
public function testTransactionTries2() {
32-
$pdo = new Pdo();
33+
$pdo = new FakePDO();
3334
$mysql = new MySQL($pdo);
3435

3536
$result = $mysql->transaction(5, function () {
@@ -45,8 +46,13 @@ public function testTransactionTries2() {
4546
}
4647

4748
public function testGetTableFields() {
48-
$pdo = new Pdo();
49-
$pdo->mock('DESCRIBE test__table', [['Field' => 'a'], ['Field' => 'b'], ['Field' => 'c']]);
49+
$eventHandler = new RegistryEventHandler();
50+
51+
$eventHandler->add('PDOStatement::fetchAll', function ($event) {
52+
return [['Field' => 'a'], ['Field' => 'b'], ['Field' => 'c']];
53+
});
54+
55+
$pdo = new FakePDO($eventHandler);
5056

5157
$mysql = new MySQL($pdo);
5258
$mysql->getAliasRegistry()->add('test', 'test__');

0 commit comments

Comments
 (0)