diff --git a/_support/Autoloader/UnnamespacedClass.php b/_support/Autoloader/UnnamespacedClass.php deleted file mode 100644 index 67b1ed3..0000000 --- a/_support/Autoloader/UnnamespacedClass.php +++ /dev/null @@ -1,5 +0,0 @@ -prefix . $key; - - return array_key_exists($key, $this->cache) - ? $this->cache[$key] - : false; - } - - //-------------------------------------------------------------------- - - /** - * Saves an item to the cache store. - * - * The $raw parameter is only utilized by Mamcache in order to - * allow usage of increment() and decrement(). - * - * @param string $key Cache item name - * @param $value the data to save - * @param null $ttl Time To Live, in seconds (default 60) - * @param boolean $raw Whether to store the raw value. - * - * @return mixed - */ - public function save(string $key, $value, int $ttl = 60, bool $raw = false) - { - $key = $this->prefix . $key; - - $this->cache[$key] = $value; - - return true; - } - - //-------------------------------------------------------------------- - - /** - * Deletes a specific item from the cache store. - * - * @param string $key Cache item name - * - * @return mixed - */ - public function delete(string $key) - { - unset($this->cache[$key]); - } - - //-------------------------------------------------------------------- - - /** - * Performs atomic incrementation of a raw stored value. - * - * @param string $key Cache ID - * @param integer $offset Step/value to increase by - * - * @return mixed - */ - public function increment(string $key, int $offset = 1) - { - $key = $this->prefix . $key; - - $data = $this->cache[$key] ?: null; - - if (empty($data)) - { - $data = 0; - } - elseif (! is_int($data)) - { - return false; - } - - return $this->save($key, $data + $offset); - } - - //-------------------------------------------------------------------- - - /** - * Performs atomic decrementation of a raw stored value. - * - * @param string $key Cache ID - * @param integer $offset Step/value to increase by - * - * @return mixed - */ - public function decrement(string $key, int $offset = 1) - { - $key = $this->prefix . $key; - - $data = $this->cache[$key] ?: null; - - if (empty($data)) - { - $data = 0; - } - elseif (! is_int($data)) - { - return false; - } - - return $this->save($key, $data - $offset); - } - - //-------------------------------------------------------------------- - - /** - * Will delete all items in the entire cache. - * - * @return mixed - */ - public function clean() - { - $this->cache = []; - } - - //-------------------------------------------------------------------- - - /** - * Returns information on the entire cache. - * - * The information returned and the structure of the data - * varies depending on the handler. - * - * @return mixed - */ - public function getCacheInfo() - { - return []; - } - - //-------------------------------------------------------------------- - - /** - * Returns detailed information about the specific item in the cache. - * - * @param string $key Cache item name. - * - * @return mixed - */ - public function getMetaData(string $key) - { - return false; - } - - //-------------------------------------------------------------------- - - /** - * Determines if the driver is supported on this system. - * - * @return boolean - */ - public function isSupported(): bool - { - return true; - } - - //-------------------------------------------------------------------- - -} diff --git a/_support/Commands/AbstractInfo.php b/_support/Commands/AbstractInfo.php deleted file mode 100644 index 2ca684e..0000000 --- a/_support/Commands/AbstractInfo.php +++ /dev/null @@ -1,13 +0,0 @@ -showError($oops); - } - } - - public function helpme() - { - $this->call('help'); - } -} diff --git a/_support/Commands/CommandsTestStreamFilter.php b/_support/Commands/CommandsTestStreamFilter.php deleted file mode 100644 index 599075b..0000000 --- a/_support/Commands/CommandsTestStreamFilter.php +++ /dev/null @@ -1,18 +0,0 @@ -data; - $consumed += $bucket->datalen; - } - return PSFS_PASS_ON; - } -} - -stream_filter_register('CommandsTestStreamFilter', 'CodeIgniter\Commands\CommandsTestStreamFilter'); diff --git a/_support/Config/BadRegistrar.php b/_support/Config/BadRegistrar.php deleted file mode 100644 index a651d11..0000000 --- a/_support/Config/BadRegistrar.php +++ /dev/null @@ -1,18 +0,0 @@ - [ - /* - * The log levels that this handler will handle. - */ - 'handles' => [ - 'critical', - 'alert', - 'emergency', - 'debug', - 'error', - 'info', - 'notice', - 'warning', - ], - ], - ]; - -} diff --git a/_support/Config/MockServices.php b/_support/Config/MockServices.php deleted file mode 100644 index 0bd6400..0000000 --- a/_support/Config/MockServices.php +++ /dev/null @@ -1,28 +0,0 @@ - TESTPATH . '_support/', - ]; - public $classmap = []; - - //-------------------------------------------------------------------- - - public function __construct() - { - // Don't call the parent since we don't want the default mappings. - // parent::__construct(); - } - - //-------------------------------------------------------------------- - public static function locator(bool $getShared = true) - { - return new \CodeIgniter\Autoloader\FileLocator(static::autoloader()); - } - -} diff --git a/_support/Config/Registrar.php b/_support/Config/Registrar.php deleted file mode 100644 index 9d00c6a..0000000 --- a/_support/Config/Registrar.php +++ /dev/null @@ -1,27 +0,0 @@ - [ - 'first', - 'second', - ], - 'format' => 'nice', - 'fruit' => [ - 'apple', - 'banana', - ], - ]; - } - -} diff --git a/_support/Config/Routes.php b/_support/Config/Routes.php deleted file mode 100644 index 2369e33..0000000 --- a/_support/Config/Routes.php +++ /dev/null @@ -1,7 +0,0 @@ -add('testing', 'TestController::index'); diff --git a/_support/Controllers/Popcorn.php b/_support/Controllers/Popcorn.php deleted file mode 100644 index 8af998d..0000000 --- a/_support/Controllers/Popcorn.php +++ /dev/null @@ -1,77 +0,0 @@ -respond('Oops', 567, 'Surprise'); - } - - public function popper() - { - throw new \RuntimeException('Surprise', 500); - } - - public function weasel() - { - $this->respond('', 200); - } - - public function oops() - { - $this->failUnauthorized(); - } - - public function goaway() - { - return redirect()->to('/'); - } - - // @see https://github.com/codeigniter4/CodeIgniter4/issues/1834 - public function index3() - { - $response = $this->response->setJSON([ - 'lang' => $this->request->getLocale(), - ]); - - // echo var_dump($this->response->getBody()); - return $response; - } - - public function canyon() - { - echo 'Hello-o-o'; - } - - public function cat() - { - } - - public function json() - { - $this->responsd(['answer' => 42]); - } - - public function xml() - { - $this->respond('cat'); - } - -} diff --git a/_support/Database/Migrations/20160428212500_Create_test_tables.php b/_support/Database/Migrations/20160428212500_Create_test_tables.php deleted file mode 100644 index 6bddd8a..0000000 --- a/_support/Database/Migrations/20160428212500_Create_test_tables.php +++ /dev/null @@ -1,149 +0,0 @@ -db->DBDriver === 'SQLite3' ? 'unique' : 'auto_increment'; - - // User Table - $this->forge->addField([ - 'id' => [ - 'type' => 'INTEGER', - 'constraint' => 3, - $unique_or_auto => true, - ], - 'name' => [ - 'type' => 'VARCHAR', - 'constraint' => 80, - ], - 'email' => [ - 'type' => 'VARCHAR', - 'constraint' => 100, - ], - 'country' => [ - 'type' => 'VARCHAR', - 'constraint' => 40, - ], - 'deleted' => [ - 'type' => 'TINYINT', - 'constraint' => 1, - 'default' => '0', - ], - 'created_at' => [ - 'type' => 'DATETIME', - 'null' => true, - ], - 'updated_at' => [ - 'type' => 'DATETIME', - 'null' => true, - ], - ]); - $this->forge->addKey('id', true); - $this->forge->createTable('user', true); - - // Job Table - $this->forge->addField([ - 'id' => [ - 'type' => 'INTEGER', - 'constraint' => 3, - $unique_or_auto => true, - ], - 'name' => [ - 'type' => 'VARCHAR', - 'constraint' => 40, - ], - 'description' => [ - 'type' => 'TEXT', - 'null' => true, - ], - 'deleted' => [ - 'type' => 'TINYINT', - 'constraint' => 1, - 'default' => '0', - ], - 'created_at' => [ - 'type' => 'INTEGER', - 'constraint' => 11, - 'null' => true, - ], - 'updated_at' => [ - 'type' => 'INTEGER', - 'constraint' => 11, - 'null' => true, - ], - ]); - $this->forge->addKey('id', true); - $this->forge->createTable('job', true); - - // Misc Table - $this->forge->addField([ - 'id' => [ - 'type' => 'INTEGER', - 'constraint' => 3, - $unique_or_auto => true, - ], - 'key' => [ - 'type' => 'VARCHAR', - 'constraint' => 40, - ], - 'value' => ['type' => 'TEXT'], - ]); - $this->forge->addKey('id', true); - $this->forge->createTable('misc', true); - - // Empty Table - $this->forge->addField([ - 'id' => [ - 'type' => 'INTEGER', - 'constraint' => 3, - $unique_or_auto => true, - ], - 'name' => [ - 'type' => 'VARCHAR', - 'constraint' => 40, - ], - 'created_at' => [ - 'type' => 'DATE', - 'null' => true, - ], - 'updated_at' => [ - 'type' => 'DATE', - 'null' => true, - ], - ]); - $this->forge->addKey('id', true); - $this->forge->createTable('empty', true); - - // Secondary Table - $this->forge->addField([ - 'id' => [ - 'type' => 'INTEGER', - 'constraint' => 3, - $unique_or_auto => true, - ], - 'key' => [ - 'type' => 'VARCHAR', - 'constraint' => 40, - ], - 'value' => ['type' => 'TEXT'], - ]); - $this->forge->addKey('id', true); - $this->forge->createTable('secondary', true); - } - - //-------------------------------------------------------------------- - - public function down() - { - $this->forge->dropTable('user'); - $this->forge->dropTable('job'); - $this->forge->dropTable('misc'); - $this->forge->dropTable('empty'); - $this->forge->dropTable('secondary'); - } - - //-------------------------------------------------------------------- - -} diff --git a/_support/Database/MockBuilder.php b/_support/Database/MockBuilder.php deleted file mode 100644 index 98c7fb6..0000000 --- a/_support/Database/MockBuilder.php +++ /dev/null @@ -1,15 +0,0 @@ -returnValues[$method] = $return; - - return $this; - } - - //-------------------------------------------------------------------- - - /** - * Orchestrates a query against the database. Queries must use - * Database\Statement objects to store the query and build it. - * This method works with the cache. - * - * Should automatically handle different connections for read/write - * queries if needed. - * - * @param string $sql - * @param mixed ...$binds - * @param boolean $setEscapeFlags - * @param string $queryClass - * - * @return \CodeIgniter\Database\BaseResult|\CodeIgniter\Database\Query|false - */ - - public function query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = 'CodeIgniter\\Database\\Query') - { - $queryClass = str_replace('Connection', 'Query', get_class($this)); - - $query = new $queryClass($this); - - $query->setQuery($sql, $binds, $setEscapeFlags); - - if (! empty($this->swapPre) && ! empty($this->DBPrefix)) - { - $query->swapPrefix($this->DBPrefix, $this->swapPre); - } - - $startTime = microtime(true); - - $this->lastQuery = $query; - - // Run the query - if (false === ($this->resultID = $this->simpleQuery($query->getQuery()))) - { - $query->setDuration($startTime, $startTime); - - // @todo deal with errors - - return false; - } - - $query->setDuration($startTime); - - $resultClass = str_replace('Connection', 'Result', get_class($this)); - - return new $resultClass($this->connID, $this->resultID); - } - - //-------------------------------------------------------------------- - - /** - * Connect to the database. - * - * @param boolean $persistent - * - * @return mixed - */ - public function connect(bool $persistent = false) - { - $return = $this->returnValues['connect'] ?? true; - - if (is_array($return)) - { - // By removing the top item here, we can - // get a different value for, say, testing failover connections. - $return = array_shift($this->returnValues['connect']); - } - - return $return; - } - - //-------------------------------------------------------------------- - - /** - * Keep or establish the connection if no queries have been sent for - * a length of time exceeding the server's idle timeout. - * - * @return boolean - */ - public function reconnect(): bool - { - return true; - } - - //-------------------------------------------------------------------- - - /** - * Select a specific database table to use. - * - * @param string $databaseName - * - * @return mixed - */ - public function setDatabase(string $databaseName) - { - $this->database = $databaseName; - - return $this; - } - - //-------------------------------------------------------------------- - - /** - * Returns a string containing the version of the database being used. - * - * @return string - */ - public function getVersion(): string - { - return CodeIgniter::CI_VERSION; - } - - //-------------------------------------------------------------------- - - /** - * Executes the query against the database. - * - * @param string $sql - * - * @return mixed - */ - protected function execute(string $sql) - { - return $this->returnValues['execute']; - } - - //-------------------------------------------------------------------- - - /** - * Returns the total number of rows affected by this query. - * - * @return int - */ - public function affectedRows(): int - { - return 1; - } - - //-------------------------------------------------------------------- - - /** - * Returns the last error code and message. - * - * Must return an array with keys 'code' and 'message': - * - * return ['code' => null, 'message' => null); - * - * @return array - */ - public function error(): array - { - return [ - 'code' => null, - 'message' => null, - ]; - } - - //-------------------------------------------------------------------- - - /** - * Insert ID - * - * @return integer - */ - public function insertID(): int - { - return $this->connID->insert_id; - } - - //-------------------------------------------------------------------- - - /** - * Generates the SQL for listing tables in a platform-dependent manner. - * - * @param boolean $constrainByPrefix - * - * @return string - */ - protected function _listTables(bool $constrainByPrefix = false): string - { - return ''; - } - - //-------------------------------------------------------------------- - - /** - * Generates a platform-specific query string so that the column names can be fetched. - * - * @param string $table - * - * @return string - */ - protected function _listColumns(string $table = ''): string - { - return ''; - } - - /** - * @param string $table - * @return array - */ - protected function _fieldData(string $table): array - { - return []; - } - - /** - * @param string $table - * @return array - */ - protected function _indexData(string $table): array - { - return []; - } - - /** - * @param string $table - * @return array - */ - protected function _foreignKeyData(string $table): array - { - return []; - } - - //-------------------------------------------------------------------- - - /** - * Close the connection. - */ - protected function _close() - { - return; - } - - //-------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @return boolean - */ - protected function _transBegin(): bool - { - return true; - } - - //-------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @return boolean - */ - protected function _transCommit(): bool - { - return true; - } - - //-------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @return boolean - */ - protected function _transRollback(): bool - { - return true; - } - - //-------------------------------------------------------------------- -} diff --git a/_support/Database/MockQuery.php b/_support/Database/MockQuery.php deleted file mode 100644 index 0008104..0000000 --- a/_support/Database/MockQuery.php +++ /dev/null @@ -1,8 +0,0 @@ - [ - [ - 'name' => 'Derek Jones', - 'email' => 'derek@world.com', - 'country' => 'US', - ], - [ - 'name' => 'Ahmadinejad', - 'email' => 'ahmadinejad@world.com', - 'country' => 'Iran', - ], - [ - 'name' => 'Richard A Causey', - 'email' => 'richard@world.com', - 'country' => 'US', - ], - [ - 'name' => 'Chris Martin', - 'email' => 'chris@world.com', - 'country' => 'UK', - ], - ], - 'job' => [ - [ - 'name' => 'Developer', - 'description' => 'Awesome job, but sometimes makes you bored', - ], - [ - 'name' => 'Politician', - 'description' => 'This is not really a job', - ], - [ - 'name' => 'Accountant', - 'description' => 'Boring job, but you will get free snack at lunch', - ], - [ - 'name' => 'Musician', - 'description' => 'Only Coldplay can actually called Musician', - ], - ], - 'misc' => [ - [ - 'key' => '\\xxxfoo456', - 'value' => 'Entry with \\xxx', - ], - [ - 'key' => '\\%foo456', - 'value' => 'Entry with \\%', - ], - [ - 'key' => 'spaces and tabs', - 'value' => ' One two three tab', - ], - ], - ]; - - foreach ($data as $table => $dummy_data) - { - $this->db->table($table)->truncate(); - - foreach ($dummy_data as $single_dummy_data) - { - $this->db->table($table)->insert($single_dummy_data); - } - } - } - - //-------------------------------------------------------------------- - -} diff --git a/_support/Database/SupportMigrations/001_Some_migration.php b/_support/Database/SupportMigrations/001_Some_migration.php deleted file mode 100644 index 2b98498..0000000 --- a/_support/Database/SupportMigrations/001_Some_migration.php +++ /dev/null @@ -1,24 +0,0 @@ -forge->addField([ - 'key' => [ - 'type' => 'VARCHAR', - 'constraint' => 255, - ], - ]); - $this->forge->createTable('foo', true); - - $this->db->table('foo')->insert([ - 'key' => 'foobar', - ]); - } - - public function down() - { - $this->forge->dropTable('foo'); - } -} diff --git a/_support/Events/MockEvents.php b/_support/Events/MockEvents.php deleted file mode 100644 index eb9186b..0000000 --- a/_support/Events/MockEvents.php +++ /dev/null @@ -1,66 +0,0 @@ -output = $output; - - return $this; - } - - //-------------------------------------------------------------------- - - protected function sendRequest(array $curl_options = []): string - { - // Save so we can access later. - $this->curl_options = $curl_options; - - return $this->output; - } - - //-------------------------------------------------------------------- - // for testing purposes only - public function getBaseURI() - { - return $this->baseURI; - } - - // for testing purposes only - public function getDelay() - { - return $this->delay; - } - -} diff --git a/_support/HTTP/MockIncomingRequest.php b/_support/HTTP/MockIncomingRequest.php deleted file mode 100644 index 627fc9a..0000000 --- a/_support/HTTP/MockIncomingRequest.php +++ /dev/null @@ -1,17 +0,0 @@ -pretend; - } - - // artificial error for testing - public function misbehave() - { - $this->statusCode = 0; - } - -} diff --git a/_support/Images/EXIFsamples/down-mirrored.jpg b/_support/Images/EXIFsamples/down-mirrored.jpg deleted file mode 100644 index 34a7b1d..0000000 --- a/_support/Images/EXIFsamples/down-mirrored.jpg +++ /dev/null Binary files differ diff --git a/_support/Images/EXIFsamples/down.jpg b/_support/Images/EXIFsamples/down.jpg deleted file mode 100644 index 9077a7c..0000000 --- a/_support/Images/EXIFsamples/down.jpg +++ /dev/null Binary files differ diff --git a/_support/Images/EXIFsamples/left-mirrored.jpg b/_support/Images/EXIFsamples/left-mirrored.jpg deleted file mode 100644 index 1832702..0000000 --- a/_support/Images/EXIFsamples/left-mirrored.jpg +++ /dev/null Binary files differ diff --git a/_support/Images/EXIFsamples/left.jpg b/_support/Images/EXIFsamples/left.jpg deleted file mode 100644 index ad1f898..0000000 --- a/_support/Images/EXIFsamples/left.jpg +++ /dev/null Binary files differ diff --git a/_support/Images/EXIFsamples/right-mirrored.jpg b/_support/Images/EXIFsamples/right-mirrored.jpg deleted file mode 100644 index cc8a29a..0000000 --- a/_support/Images/EXIFsamples/right-mirrored.jpg +++ /dev/null Binary files differ diff --git a/_support/Images/EXIFsamples/right.jpg b/_support/Images/EXIFsamples/right.jpg deleted file mode 100644 index 183ffeb..0000000 --- a/_support/Images/EXIFsamples/right.jpg +++ /dev/null Binary files differ diff --git a/_support/Images/EXIFsamples/up-mirrored.jpg b/_support/Images/EXIFsamples/up-mirrored.jpg deleted file mode 100644 index e1865a5..0000000 --- a/_support/Images/EXIFsamples/up-mirrored.jpg +++ /dev/null Binary files differ diff --git a/_support/Images/EXIFsamples/up.jpg b/_support/Images/EXIFsamples/up.jpg deleted file mode 100644 index 70fc26f..0000000 --- a/_support/Images/EXIFsamples/up.jpg +++ /dev/null Binary files differ diff --git a/_support/Images/Steveston_dusk.JPG b/_support/Images/Steveston_dusk.JPG deleted file mode 100644 index c3b9b12..0000000 --- a/_support/Images/Steveston_dusk.JPG +++ /dev/null Binary files differ diff --git a/_support/Images/ci-logo.gif b/_support/Images/ci-logo.gif deleted file mode 100644 index 3001b2f..0000000 --- a/_support/Images/ci-logo.gif +++ /dev/null Binary files differ diff --git a/_support/Images/ci-logo.jpeg b/_support/Images/ci-logo.jpeg deleted file mode 100644 index 1b0178b..0000000 --- a/_support/Images/ci-logo.jpeg +++ /dev/null Binary files differ diff --git a/_support/Images/ci-logo.png b/_support/Images/ci-logo.png deleted file mode 100644 index 34fb010..0000000 --- a/_support/Images/ci-logo.png +++ /dev/null Binary files differ diff --git a/_support/Language/MockLanguage.php b/_support/Language/MockLanguage.php deleted file mode 100644 index 49301db..0000000 --- a/_support/Language/MockLanguage.php +++ /dev/null @@ -1,61 +0,0 @@ -language[$locale ?? $this->locale][$file] = $data; - - return $this; - } - - //-------------------------------------------------------------------- - - /** - * Provides an override that allows us to set custom - * data to be returned easily during testing. - * - * @param string $path - * - * @return array|mixed - */ - protected function requireFile(string $path): array - { - return $this->data ?? []; - } - - //-------------------------------------------------------------------- - - /** - * Arbitrarily turnoff internationalization support for testing - */ - public function disableIntlSupport() - { - $this->intlSupport = false; - } - -} diff --git a/_support/Language/SecondMockLanguage.php b/_support/Language/SecondMockLanguage.php deleted file mode 100644 index 7142885..0000000 --- a/_support/Language/SecondMockLanguage.php +++ /dev/null @@ -1,27 +0,0 @@ -load($file, $locale, $return); - } - - //-------------------------------------------------------------------- - - /** - * Expose the loaded language files - */ - public function loaded(string $locale = 'en') - { - return $this->loadedFiles[$locale]; - } - -} diff --git a/_support/Language/ab-CD/Allin.php b/_support/Language/ab-CD/Allin.php deleted file mode 100644 index 3b15388..0000000 --- a/_support/Language/ab-CD/Allin.php +++ /dev/null @@ -1,8 +0,0 @@ - 'Pyramid of Giza', - 'tre' => 'Colossus of Rhodes', - 'fiv' => 'Temple of Artemis', - 'sev' => 'Hanging Gardens of Babylon', -]; diff --git a/_support/Language/ab/Allin.php b/_support/Language/ab/Allin.php deleted file mode 100644 index 6912075..0000000 --- a/_support/Language/ab/Allin.php +++ /dev/null @@ -1,8 +0,0 @@ - 'gluttony', - 'tre' => 'greed', - 'six' => 'envy', - 'sev' => 'pride', -]; diff --git a/_support/Language/en-ZZ/More.php b/_support/Language/en-ZZ/More.php deleted file mode 100644 index 6681020..0000000 --- a/_support/Language/en-ZZ/More.php +++ /dev/null @@ -1,6 +0,0 @@ - 'These are not the droids you are looking for', - 'notaMoon' => "It's made of cheese", - 'wisdom' => 'There is no try', -]; diff --git a/_support/Language/en/Allin.php b/_support/Language/en/Allin.php deleted file mode 100644 index 6a10dcc..0000000 --- a/_support/Language/en/Allin.php +++ /dev/null @@ -1,8 +0,0 @@ - 'four calling birds', - 'fiv' => 'five golden rings', - 'six' => 'six geese a laying', - 'sev' => 'seven swans a swimming', -]; diff --git a/_support/Language/en/Core.php b/_support/Language/en/Core.php deleted file mode 100644 index b2fc4c1..0000000 --- a/_support/Language/en/Core.php +++ /dev/null @@ -1,20 +0,0 @@ - '{0} extension could not be found.', - 'bazillion' => 'billions and billions', // adds a new setting -]; diff --git a/_support/Language/en/More.php b/_support/Language/en/More.php deleted file mode 100644 index 5b4eaea..0000000 --- a/_support/Language/en/More.php +++ /dev/null @@ -1,7 +0,0 @@ - 'These are not the droids you are looking for', - 'notaMoon' => "That's no moon... it's a space station", - 'cannotMove' => 'I have a very bad feeling about this', -]; diff --git a/_support/Language/ru/Language.php b/_support/Language/ru/Language.php deleted file mode 100644 index d6c6632..0000000 --- a/_support/Language/ru/Language.php +++ /dev/null @@ -1,5 +0,0 @@ - 'Whatever this would be, translated', -]; diff --git a/_support/Log/Handlers/MockChromeHandler.php b/_support/Log/Handlers/MockChromeHandler.php deleted file mode 100644 index 1a64b22..0000000 --- a/_support/Log/Handlers/MockChromeHandler.php +++ /dev/null @@ -1,25 +0,0 @@ -json['rows'][0]; - } - -} diff --git a/_support/Log/Handlers/MockFileHandler.php b/_support/Log/Handlers/MockFileHandler.php deleted file mode 100644 index efd72a9..0000000 --- a/_support/Log/Handlers/MockFileHandler.php +++ /dev/null @@ -1,25 +0,0 @@ -handles = $config['handles'] ?? []; - $this->destination = $this->path . 'log-' . date('Y-m-d') . '.' . $this->fileExtension; - } - -} diff --git a/_support/Log/Handlers/TestHandler.php b/_support/Log/Handlers/TestHandler.php deleted file mode 100644 index e22559c..0000000 --- a/_support/Log/Handlers/TestHandler.php +++ /dev/null @@ -1,64 +0,0 @@ -handles = $config['handles'] ?? []; - $this->destination = $this->path . 'log-' . date('Y-m-d') . '.' . $this->fileExtension; - - self::$logs = []; - } - - //-------------------------------------------------------------------- - - /** - * Handles logging the message. - * If the handler returns false, then execution of handlers - * will stop. Any handlers that have not run, yet, will not - * be run. - * - * @param $level - * @param $message - * - * @return boolean - */ - public function handle($level, $message): bool - { - $date = date($this->dateFormat); - - self::$logs[] = strtoupper($level) . ' - ' . $date . ' --> ' . $message; - - return true; - } - - //-------------------------------------------------------------------- - - public static function getLogs() - { - return self::$logs; - } - - //-------------------------------------------------------------------- -} diff --git a/_support/Log/TestLogger.php b/_support/Log/TestLogger.php deleted file mode 100644 index a88eb62..0000000 --- a/_support/Log/TestLogger.php +++ /dev/null @@ -1,82 +0,0 @@ -assertLogged() methods. - * - * @param string $level - * @param string $message - * @param array $context - * - * @return boolean - */ - public function log($level, $message, array $context = []): bool - { - // While this requires duplicate work, we want to ensure - // we have the final message to test against. - $log_message = $this->interpolate($message, $context); - - // Determine the file and line by finding the first - // backtrace that is not part of our logging system. - $trace = debug_backtrace(); - $file = null; - - foreach ($trace as $row) - { - if (! in_array($row['function'], ['log', 'log_message'])) - { - $file = basename($row['file'] ?? ''); - break; - } - } - - self::$op_logs[] = [ - 'level' => $level, - 'message' => $log_message, - 'file' => $file, - ]; - - // Let the parent do it's thing. - return parent::log($level, $message, $context); - } - - //-------------------------------------------------------------------- - - /** - * Used by CIUnitTestCase class to provide ->assertLogged() methods. - * - * @param string $level - * @param string $message - * - * @return boolean - */ - public static function didLog(string $level, $message) - { - foreach (self::$op_logs as $log) - { - if (strtolower($log['level']) === strtolower($level) && $message === $log['message']) - { - return true; - } - } - - return false; - } - - //-------------------------------------------------------------------- - // Expose cleanFileNames() - public function cleanup($file) - { - return $this->cleanFileNames($file); - } - -} diff --git a/_support/MockCodeIgniter.php b/_support/MockCodeIgniter.php deleted file mode 100644 index 3e31d00..0000000 --- a/_support/MockCodeIgniter.php +++ /dev/null @@ -1,11 +0,0 @@ -tokens[] = 'beforeInsert'; - - return $data; - } - - protected function afterInsertMethod(array $data) - { - $this->tokens[] = 'afterInsert'; - - return $data; - } - - protected function beforeUpdateMethod(array $data) - { - $this->tokens[] = 'beforeUpdate'; - - return $data; - } - - protected function afterUpdateMethod(array $data) - { - $this->tokens[] = 'afterUpdate'; - - return $data; - } - - protected function afterFindMethod(array $data) - { - $this->tokens[] = 'afterFind'; - - return $data; - } - - protected function afterDeleteMethod(array $data) - { - $this->tokens[] = 'afterDelete'; - - return $data; - } - - public function hasToken(string $token) - { - return in_array($token, $this->tokens); - } - -} diff --git a/_support/Models/JobModel.php b/_support/Models/JobModel.php deleted file mode 100644 index 98c4ad2..0000000 --- a/_support/Models/JobModel.php +++ /dev/null @@ -1,23 +0,0 @@ - [], - 'dates' => [ - 'created_at', - 'updated_at', - 'deleted_at', - ], - 'casts' => [], - ]; -} diff --git a/_support/Models/UserModel.php b/_support/Models/UserModel.php deleted file mode 100644 index 0501882..0000000 --- a/_support/Models/UserModel.php +++ /dev/null @@ -1,27 +0,0 @@ - [ - 'required', - 'min_length[10]', - 'errors' => [ - 'min_length' => 'Minimum Length Error', - ] - ], - 'token' => 'in_list[{id}]', - ]; -} diff --git a/_support/Models/ValidModel.php b/_support/Models/ValidModel.php deleted file mode 100644 index 69842d8..0000000 --- a/_support/Models/ValidModel.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'required', - 'min_length[3]', - ], - 'token' => 'in_list[{id}]', - ]; - - protected $validationMessages = [ - 'name' => [ - 'required' => 'You forgot to name the baby.', - 'min_length' => 'Too short, man!', - ], - ]; -} diff --git a/_support/Security/MockSecurity.php b/_support/Security/MockSecurity.php deleted file mode 100644 index 7a9239f..0000000 --- a/_support/Security/MockSecurity.php +++ /dev/null @@ -1,17 +0,0 @@ -CSRFHash; - - return $this; - } - - //-------------------------------------------------------------------- - -} diff --git a/_support/Services.php b/_support/Services.php deleted file mode 100644 index 48e8283..0000000 --- a/_support/Services.php +++ /dev/null @@ -1,70 +0,0 @@ -driver, true); - } - - //-------------------------------------------------------------------- - - /** - * Starts the session. - * Extracted for testing reasons. - */ - protected function startSession() - { - // session_start(); - } - - //-------------------------------------------------------------------- - - /** - * Takes care of setting the cookie on the client side. - * Extracted for testing reasons. - */ - protected function setCookie() - { - $this->cookies[] = [ - $this->sessionCookieName, - session_id(), - (empty($this->sessionExpiration) ? 0 : time() + $this->sessionExpiration), - $this->cookiePath, - $this->cookieDomain, - $this->cookieSecure, - true, - ]; - } - - //-------------------------------------------------------------------- - - public function regenerate(bool $destroy = false) - { - $this->didRegenerate = true; - $_SESSION['__ci_last_regenerate'] = time(); - } - - //-------------------------------------------------------------------- -} diff --git a/_support/SomeEntity.php b/_support/SomeEntity.php deleted file mode 100644 index 70ddc4d..0000000 --- a/_support/SomeEntity.php +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/_support/View/Views/simpler.php b/_support/View/Views/simpler.php deleted file mode 100644 index 0588b62..0000000 --- a/_support/View/Views/simpler.php +++ /dev/null @@ -1 +0,0 @@ -

{testString}

\ No newline at end of file diff --git a/_support/_bootstrap.php b/_support/_bootstrap.php deleted file mode 100644 index 65dd9a1..0000000 --- a/_support/_bootstrap.php +++ /dev/null @@ -1,32 +0,0 @@ -