1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-02 19:52:32 +02:00

320 Commits

Author SHA1 Message Date
Cameron
a429bc13f8 computeLapse test updated. 2019-01-15 20:31:08 -08:00
Cameron
8f73232a4d Tests for global LAN file detection. 2019-01-13 13:32:58 -08:00
Cameron
43bcfdee16 More tests. 2019-01-11 11:57:43 -08:00
Cameron
2e60a2bd31 Base64 test against ajax url added. 2019-01-07 17:04:02 -08:00
Cameron
960d219766 Added test for secondary database connections 2019-01-05 14:37:58 -08:00
Deltik
2a029220a7
cPanelDeployer: Preserve file permissions in ZipArchive
Reference: https://stackoverflow.com/a/53997599/1038828
2019-01-01 11:48:10 -06:00
Cameron
1b5182d011 buildAddonPrefLists test added. 2018-12-17 10:39:19 -08:00
Deltik
ffd27d2d80
Deactivated "stash" lock in GitPreparer
The "stash" lock was used to shove .gitignore'd files under the rug
so that they would not interfere with a pure copy of the app.

Vendor files may be ignored in the app, so for performance, the
"stash" lock has been deactivated. Vendor files no longer need to
be downloaded each time the test runs.

The "commit" lock now includes all ignored files so that tests
are run with the files as they are.
2018-11-19 15:14:34 -06:00
Cameron
5c3e14f8d1 XML Class import/export method tests and e107::serialize() test. 2018-11-15 14:24:47 -08:00
Cameron
99772ae134 TinyMce parser tests for backward compatibility with BBcodes and plain text. 2018-11-13 13:32:26 -08:00
Deltik
48654804bd
e_parse::parseTemplate() behavior clarification
New tests cover the behavior described in
https://github.com/e107inc/e107/issues/3547
2018-11-09 16:52:37 -06:00
Deltik
eec2feb8b3
pluginsTest::testBanner() e_parse cases
See https://github.com/e107inc/e107/issues/3547 for details.
2018-11-08 21:05:24 -06:00
Cameron
e9e9f6288e Added placeholder test for Media-Manager upload processing. 2018-11-03 12:59:06 -07:00
Nick Liu
9e0d603609
100% test coverage for \e107\Shims
New test forces a failover of the `readfile()` internal function to
test the failover functionality of \e107\Shims\Internal::readfile()
2018-11-03 09:11:42 -05:00
Nick Liu
7c2b4f8f25
Reload e_shortcode_parser for pluginsTest::testBanner()
e_shortcode_parser normally doesn't need reloading in an e107
installation because installing the "banner" plugin and parsing
shortcodes have always been two separate script calls (page loads).

It would slow down the e107 core to add an e_shortcode_parser reloader
after installing a plugin when the page would later exit without
parsing any shortcodes.
2018-11-02 12:49:24 -05:00
Nick Liu
f27636ff14
Fixed race condition in e_parseTest::testToForm()
Other tests have been meddling with the e107::wysiwyg() global state

e_parseTest::testToForm() now considers two outcomes of the
e107::wysiwyg() state.
2018-11-01 19:31:04 -05:00
Nick Liu
556aea02ea
Removed Internet dependency from pluginsTest::testRemotePlugin() 2018-11-01 19:12:11 -05:00
Nick Liu
b9f794b1a9
Disregard race condition by increasing tolerance in e107pluginTest
e107pluginTest::testXmlSiteLinks() ignores the primary key and model
order because another test could have inserted records before this test.
2018-11-01 19:09:48 -05:00
Nick Liu
aa458ee7d3
Explicit timezone settings in e_DateTest and e_formTest 2018-11-01 18:49:20 -05:00
Nick Liu
9e6bb14641
Removed Internet dependency from e_marketplaceTest 2018-11-01 18:48:06 -05:00
Nick Liu
da8a2015aa
Consistency fix for e_formTest 2018-11-01 14:33:43 -05:00
Nick Liu
1fc01e08f0
Fixed rollback bug in GitPreparer
Added a guard to GitPreparer::unsetVcsInProgress() to prevent doing a
`git reset` when there are no test locks present.

Otherwise, the uncommitted changes in the app will be removed by the
shutdown feature introduced in 952c6e5890daa36236be675d8c4f21cecabc1fe7.
2018-11-01 09:32:43 -05:00
Nick Liu
93d8b7f0c5
General repo cleanup
Removed unused includes/bootstrap.php

Made a new e107 sample database dump
2018-11-01 07:20:11 -05:00
Nick Liu
952c6e5890
PriorityCallbacks: Execute callbacks before Codeception's
GitPreparer now registers a "priority" register_shutdown_function
callback in order to clean up in case of a fatal error.
2018-11-01 06:57:38 -05:00
Nick Liu
6f416523c3
Renamed e_shims to eShims
To follow @myovchev's convention like eHelper

Per @CaMer0n
2018-10-31 12:27:45 -05:00
Nick Liu
f145622207
Added tests for e_shims 2018-10-31 08:06:42 -05:00
Cameron
10a21270f4 Comment added for date lapse issue. 2018-10-04 15:54:28 -07:00
Cameron
871a0f4da3 Basic test for {e_BASE} added. 2018-10-02 11:51:47 -07:00
Nick Liu
e9f89cede6
InstallCest now clears the database
InstallCest now drops all tables from the test database before running
each test.

Fixes: #13
2018-09-30 14:06:19 -05:00
Nick Liu
c512dc2fcc
Started but couldn't test e_parse_shortcode 2018-09-27 11:32:06 -05:00
Nick Liu
9125b60b59
Added performance test for e_form::inlineToken() 2018-09-23 15:39:37 -05:00
Nick Liu
6f8d6fff5b
Reindented tests/unit/e_formTest.php 2018-09-23 15:26:49 -05:00
Cameron
d622aa28a5 Test for XMLSiteLinks 2018-09-18 09:38:59 -07:00
Cameron
9209f912fa db-verify compare 2018-09-16 16:31:32 -07:00
Cameron
7bbf3164c7 Test for [img] bbcode in toHTML() 2018-09-12 13:21:19 -07:00
Nick Liu
c72b08616b
Refactored E107Base suite cleanup into "Preparer" classes
Now works with the best of both worlds:

* Barebones cleanup in slow Windows environments
* Git snapshots in other Git environments
2018-09-12 12:54:15 -05:00
Cameron
124381f5e7 Merge branch 'master' of https://github.com/e107inc/e107-test 2018-09-11 14:16:29 -07:00
Cameron
4245ff138d Work in Progress. 2018-09-11 14:16:10 -07:00
Nick Liu
11448a4a9f
Fixed possible fatal error in e107Test 2018-09-11 16:14:01 -05:00
Cameron
0fca5840f2 Disabled VCS modification. Added fixed hash folder name and cleanup before/after tests. 2018-09-09 18:20:20 -07:00
Cameron
5b9e2572a4 Test fixes. 2018-09-09 10:18:19 -07:00
Nick Liu
8f38794e14
Merge branch 'master' of github.com:e107inc/e107-test 2018-09-09 01:18:48 -05:00
Nick Liu
3af03f1f5e
Greatly improved robustness of E107Base
Fixed irreversible data loss bug when preparing the app path repo
for tests

OLD BEHAVIOR
Remove untracked files from the working tree before and after
every test suite. The intention was to remove files that could
have been created by the tests, but this also removes all other
untracked files, including third-party plugins and themes.

NEW BEHAVIOR
There is now a triple locking mechanism protecting the state of
the app repository before tests are run so that after tests have
run, all file contents are restored to how they were before the
tests have run.

There are three locks, each guarding a different part of the
original repo:

* file
* commit
* stash

When the file lock is present, E107Base knows that any other file,
tracked, untracked, or ignored, was created by the tested code.

The file lock is checked into the commit lock, which saves all
tracked and untracked files in the form of a commit. This way,
uncommitted code can be tested without manually making a commit that
includes the untracked files.

The stash lock saves all ignored files in a Git stash. Ignored files
go in a stash instead of in the commit lock because they can be a
confounding variable affecting the outcome of tests. They are usually
user-configurable only and may not represent tested states.

When the saving is complete, E107Base will have access to tracked and
untracked files but not ignored files. The tests are run in this
configuration.

After each test suite runs, the repo is reset and cleaned to return
the files to the same state they were in before the test suite began.

Then, the locks are undone first by rolling back the commit lock,
which restores the originally uncommitted tracked and untracked
files. Next, the stash lock is popped, restoring the originally
ignored files. Finally, the file lock is removed, signifying that the
repo is back to its original data before the test suite was run.

In case of an ungraceful exit, at least one of the locks would be
left in the repo. The next time E107Base runs, locks are checked, and
if one or more are present, the repo is restored before the locks are
reestablished.

If the `git` command is inoperative, only the file lock is operative
and does nothing more than signify a test that is in progress or has
exited unexpectedly. Data protection is silently unenforced. This can
lead to unexpected tracked, untracked, and ignored file modifications
that will not be rolled back after a test suite has run.
2018-09-09 01:18:09 -05:00
Cameron
bc29ef1efe Removed buggy value unserialize test. 2018-09-08 13:44:07 -07:00
Cameron
aef5a04e00 More admin-ui tests and separate inline checks. (very basic right now) 2018-09-04 15:26:29 -07:00
Nick Liu
5a8e4e166f
Initial integration with GitLab CI 2018-08-29 15:58:17 -05:00
Nick L
fc96dd5281
Merge pull request #12 from SimSync/fix_11
fixes #11 Typo in assertEquals
2018-08-27 09:58:28 -05:00
Achim Ennenbach
4fca8150d0 fixes #11 Typo in assertEquals 2018-08-27 15:39:59 +02:00
Cameron
7c7f636f3c Check TinyMce is installed after installations. 2018-08-25 15:32:11 -07:00
Cameron
71cca7bc86 Merge branch 'master' of https://github.com/e107inc/e107-test 2018-08-24 13:01:27 -07:00