Skip to content
Merged
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
34 changes: 34 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Continuous Integration"

on: [push]

env:
fail-fast: true

jobs:
tests:
name: "Doctrine1 Tests"
runs-on: "ubuntu-22.04"

strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
# extensions: "${{ matrix.extension }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"

- name: "Run Tests"
run: "cd tests && php run.php"
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions tests/QueryTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@ public function testParseTableAliasesWithBetweenInWhereClause()
$q1 = Doctrine_Query::create()
->select('u.id')
->from('QueryTest_User u')
->where("CURRENT_DATE() BETWEEN u.QueryTest_Subscription.begin AND u.QueryTest_Subscription.begin")
->where("now() BETWEEN u.QueryTest_Subscription.begin AND u.QueryTest_Subscription.begin")
->addWhere( 'u.id != 5' )
;

$expected = 'SELECT q.id AS q__id FROM query_test__user q LEFT JOIN query_test__subscription q2 ON q.subscriptionid = q2.id WHERE (CURRENT_DATE() BETWEEN q2.begin AND q2.begin AND q.id != 5)';
$expected = 'SELECT q.id AS q__id FROM query_test__user q LEFT JOIN query_test__subscription q2 ON q.subscriptionid = q2.id WHERE (datetime(\'now\') BETWEEN q2.begin AND q2.begin AND q.id != 5)';

$this->assertEqual( $q1->getSqlQuery(), $expected );

Expand Down
6 changes: 6 additions & 0 deletions tests/Ticket/2355TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
*/
class Doctrine_Ticket_2355_TestCase extends Doctrine_UnitTestCase
{
public function setUp()
{
Doctrine_Manager::getInstance()->reset();
parent::setUp();
}

public function prepareTables()
{
$this->tables[] = 'News';
Expand Down
2 changes: 1 addition & 1 deletion tests/bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ skipPHPVersions='php8'
# Commands
#
dcexec="docker-compose exec -u `id -u`:`id -g`"
composerUpdate='composer update --prefer-dist --no-suggest --optimize-autoloader'
composerUpdate='composer update --prefer-dist --optimize-autoloader'
doctrineTestSuite='run.php'

# Parse arguments
Expand Down