| @@ 14-35 (lines=22) @@ | ||
| 11 | ||
| 12 | protected static $connection; |
|
| 13 | ||
| 14 | public static function setUpBeforeClass() |
|
| 15 | { |
|
| 16 | $extendedPdo = new ExtendedPdo('sqlite::memory:'); |
|
| 17 | $extendedPdo->exec("ATTACH DATABASE `jpemeric_stream.db` AS `jpemeric_stream`"); |
|
| 18 | $extendedPdo->exec(" |
|
| 19 | CREATE TABLE IF NOT EXISTS `jpemeric_stream`.`activity` ( |
|
| 20 | `id` integer PRIMARY KEY AUTOINCREMENT, |
|
| 21 | `message` text NOT NULL, |
|
| 22 | `message_long` text NOT NULL, |
|
| 23 | `datetime` datetime NOT NULL, |
|
| 24 | `metadata` text NOT NULL, |
|
| 25 | `type` varchar(10) NOT NULL, |
|
| 26 | `type_id` integer NOT NULL, |
|
| 27 | `created_at` datetime, |
|
| 28 | `updated_at` datetime |
|
| 29 | )" |
|
| 30 | ); |
|
| 31 | ||
| 32 | self::$connection = new ConnectionLocator(function () use ($extendedPdo) { |
|
| 33 | return $extendedPdo; |
|
| 34 | }); |
|
| 35 | } |
|
| 36 | ||
| 37 | public function testIsInstanceOfActivityRepository() |
|
| 38 | { |
|
| @@ 14-35 (lines=22) @@ | ||
| 11 | ||
| 12 | protected static $connection; |
|
| 13 | ||
| 14 | public static function setUpBeforeClass() |
|
| 15 | { |
|
| 16 | $extendedPdo = new ExtendedPdo('sqlite::memory:'); |
|
| 17 | $extendedPdo->exec("ATTACH DATABASE `jpemeric_stream.db` AS `jpemeric_stream`"); |
|
| 18 | $extendedPdo->exec(" |
|
| 19 | CREATE TABLE IF NOT EXISTS `jpemeric_stream`.`changelog` ( |
|
| 20 | `id` integer PRIMARY KEY AUTOINCREMENT, |
|
| 21 | `hash` char(40) NOT NULL, |
|
| 22 | `message` text, |
|
| 23 | `message_short` varchar(100), |
|
| 24 | `datetime` datetime NOT NULL, |
|
| 25 | `author` varchar(50) NOT NULL, |
|
| 26 | `commit_link` varchar(100) NOT NULL, |
|
| 27 | `created_at` datetime, |
|
| 28 | `updated_at` datetime |
|
| 29 | )" |
|
| 30 | ); |
|
| 31 | ||
| 32 | self::$connection = new ConnectionLocator(function () use ($extendedPdo) { |
|
| 33 | return $extendedPdo; |
|
| 34 | }); |
|
| 35 | } |
|
| 36 | ||
| 37 | public function testIsInstanceOfChangelogRepository() |
|
| 38 | { |
|