Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['7.2']
php-version: ['7.4']

steps:
- name: Checkout Code
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
run: mkdir -p reports/behat-default reports/behat-security test/screenshots

- name: Run PHPUnit (Unit Tests)
run: ./vendor/bin/phpunit --log-junit reports/unit-report.xml src/OpenCATS/Tests/UnitTests
run: ./vendor/bin/phpunit --log-junit reports/unit-report.xml --testsuite UnitTests

- name: Run Integration Tests (Docker)
run: |
Expand All @@ -79,7 +79,7 @@ jobs:
docker compose -f docker-compose-test.yml exec -T php php -r "echo 'IP for integrationtestdb: ' . gethostbyname('integrationtestdb') . PHP_EOL;"

echo "Running PHPUnit Integration Tests..."
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php ./vendor/bin/phpunit --log-junit /var/www/public/reports/integration-report.xml src/OpenCATS/Tests/IntegrationTests
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php ./vendor/bin/phpunit --log-junit /var/www/public/reports/integration-report.xml --testsuite IntegrationTests

echo "Running Behat Suites..."
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php ./vendor/bin/behat -v -c ./test/behat.yml --suite="default" --format=progress
Expand Down
14 changes: 0 additions & 14 deletions QueueCLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@
@session_name(CATS_SESSION_NAME);
session_start();

/* Make sure we aren't getting screwed over by magic quotes. */
if (get_magic_quotes_runtime())
{
if (function_exists('set_magic_quotes_runtime')) {
set_magic_quotes_runtime(0);
}
}
if (get_magic_quotes_gpc())
{
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_REQUEST = array_map('stripslashes', $_REQUEST);
}

if (!isset($_SESSION['CATS']) || empty($_SESSION['CATS']))
{
$_SESSION['CATS'] = new CATSSession();
Expand Down
10 changes: 5 additions & 5 deletions README-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ To mirror the CI environment on your machine:
2. **Start the containers:**
```bash
cd docker/
docker compose -f docker-compose-test.yml up -d
docker compose -f docker-compose-test.yml up -d --build
```

3. **Install PHP dependencies (Composer):**
```bash
docker run --rm -v "$(pwd)/..":/app -w /app composer:2 composer install --no-interaction --prefer-dist --ignore-platform-reqs
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php composer install --no-interaction --prefer-dist
```

4. **Run the suites:**
* **PHPUnit Unit Tests:** `docker exec -it opencats_test_php ./vendor/bin/phpunit src/OpenCATS/Tests/UnitTests`
* **PHPUnit Integration Tests:** `docker exec -it opencats_test_php ./vendor/bin/phpunit src/OpenCATS/Tests/IntegrationTests`
* **Behat:** `docker exec -it opencats_test_php ./vendor/bin/behat -c ./test/behat.yml`
* **PHPUnit Unit Tests:** `docker compose -f docker-compose-test.yml exec php ./vendor/bin/phpunit --testsuite UnitTests`
* **PHPUnit Integration Tests:** `docker compose -f docker-compose-test.yml exec php ./vendor/bin/phpunit --testsuite IntegrationTests`
* **Behat:** `docker compose -f docker-compose-test.yml exec php ./vendor/bin/behat -c ./test/behat.yml`

---

Expand Down
14 changes: 0 additions & 14 deletions ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,6 @@
session_start();
}

/* Make sure we aren't getting screwed over by magic quotes. */
if (get_magic_quotes_runtime())
{
if (function_exists('set_magic_quotes_runtime')) {
set_magic_quotes_runtime(0);
}
}
if (get_magic_quotes_gpc())
{
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_REQUEST = array_map('stripslashes', $_REQUEST);
}

if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST' &&
isset($_SESSION['CATS']) && $_SESSION['CATS']->isLoggedIn())
{
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Free and open source candidate/applicant tracking system for recruiters.",
"type": "project",
"require": {
"php": ">=7.2",
"php": "^7.4",
"ckeditor/ckeditor": "^4.25.1",
"neutron/sphinxsearch-api": "^2.0.8",
"phpmailer/phpmailer": "^7.0.2",
Expand All @@ -12,10 +12,10 @@
"require-dev": {
"behat/behat": "^3.15.0",
"behat/mink": "^1.13.0",
"friends-of-behat/mink-extension": "^2.3.1",
"friends-of-behat/mink-extension": "^2.7.5",
"behat/mink-browserkit-driver": "^2.3.0",
"behat/mink-selenium2-driver": "^1.7.0",
"phpunit/phpunit": "^8.5.52"
"phpunit/phpunit": "^9.6.34"
},
"autoload": {
"psr-4": {
Expand Down
Loading
Loading